Notifications
Clear all
[Closed] Encoding Byte->Char
Mar 13, 2015 9:47 pm
Hi all, how to change the encoding in the read text from a byte?
Function has bit.intAsChar, it seems there a problem in the proper encoding characters GBK2312
Or there is another solutions? I need to read from a file 256 bytes of text encoding GBk2312
fn ReadFixedString bstream fixedLen=
(
local str = ""
for i = 1 to fixedLen do
(
local ch = ReadByte bstream #unsigned
str += bit.intAsChar ch
if ch == 0 then
(
SkipBytes bstream (fixedLen - i)
exit
)
)
str
)
thanks