StrBuf

Copies a string to a buffer, optionally converting to or from a given code page.

OutputVar := StrPutBuf(String, Encoding)
Function Example: MyBuf := StrBuf("AutoHotkey", "CP0")

Parameters

OutputVar

The name of the variable in which to store the created Buffer object containing the converted string.

String

Any string. Numbers are also acceptable.

Encoding (optional)

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.

Remarks

If conversion between code pages is necessary, the required buffer size may differ from the size of the source String.

Examples

MsgBox StrGet(StrBuf("AutoHotkey","CP0"),"CP0")