l0.DependencyControl.helpers.ffi-windows¶
Functions¶
toWide ¶
Converts a UTF-8 string to a NUL-terminated wide-char (UTF-16) buffer for the *W Win32 APIs.
Requires kernel32 to have loaded (see haveKernel32); errors otherwise.
| param | type | description |
|---|---|---|
| s | string |
A UTF-8 encoded string. |
Returns:
bufferffi.cdata* — A wchar_t[] buffer holding the converted, NUL-terminated string.
setConsoleOutputUTF8 ¶
Switches the attached console's output code page to UTF-8. Returns false if kernel32 is unavailable or no console is attached (output is redirected).
Returns:
okboolean— Whether the output code page was switched to UTF-8.
Fields¶
| field | type | description |
|---|---|---|
| kernel32 | any |
|
| haveKernel32 | boolean |