This method writes a wide string to the stream at the current position.
function stream:write_wstring(s: wstring, terminate: boolean = true)
s
(wstring): string to writeterminate
(boolean): if true an extra short with a value of zero will be written at the end of the string-- This example saves a wide string to a UTF-16 encoded text file.
local s = L"Привет, как ты сегодня? Я в порядке."
local path = GetPath(PATH_DOCUMENTS) + "/temp.txt"
local stream = WriteFile(path)
stream:write_byte(255)
stream:write_byte(254)
stream:write_wstring(s, false)
stream:close()
RunFile(path)