Copies a string to a variable, optionally converting to or from a given code page.
OutputVar := StrPutVar(String, Variable [, Encoding])Command Example: StrPutVar "AutoHotkey", Var, "CP0" Function Example: size := StrPutVar("AutoHotkey", Var, "CP0")
The name of the variable in which to store size of new string in bytes including terminator.
Any string. Numbers are also acceptable.
Output variable to store new string.
The source encoding for StrGet or target encoding for StrPut; for example, "UTF-8", "UTF-16" or "CP936".Specify "CP0" to use the system default ANSI code page. When omitted UTF-8 is used.
If conversion between code pages is necessary, the required buffer size may differ from the size of the source String.
Script Compatibility, StrGet,, StrPut, FileEncoding, VarSetCapacity
MsgBox % StrPutVar("AutoHotkey",var,"CP0")