how to convert a text from Windows-1256 to Unicode? Any method or API function
Windows 1256 (https://msdn.microsoft.com/en-us/goglobal/cc305149.aspx)
MultiByteToWideChar
Thank you jj2007 ; I forgot it :P
Hi, mabdelouahab!
When I need to transfer the text from the Windows-1251 (https://msdn.microsoft.com/en-us/goglobal/cc305144.aspx) code to Unicode I use a macro du
du macro string
local bslash
bslash = 0
irpc c,<string>
if bslash eq 0
if '&c' eq "/"
bslash = 1
elseif '&c'gt 127
db ('&c'- 0B0h),4
else
dw '&c'
endif
else
bslash = 0
if '&c' eq "n"
DW 0Dh,0Ah
elseif '&c' eq "/"
dw '/'
elseif '&c' eq "r"
dw 0Dh
elseif '&c' eq "l"
dw 0Ah
elseif '&c' eq "s"
dw 20h
elseif '&c' eq "c"
dw 3Bh
elseif '&c' eq "t"
dw 9
endif
endif
endm
dw 0
endm
for example wHello: du <Hello, world>