Page 1 of 1

ByteLen() and Unicode

Posted: Sat May 04, 2019 3:03 pm
by msu
Under Windows10 x64:

Code: Select all

SetDefaultEncoding(#ENCODING_UTF8, #ENCODING_UTF8)
a$ = "H"
DebugPrint(ByteLen(a$))
Normally, the result should be 4 bytes.

According to ByteLen, a$ is only 1 byte in size. :?:

Re: ByteLen() and Unicode

Posted: Sat May 04, 2019 5:44 pm
by airsoftsoftwair
Huh? "H" is one byte in UTF-8... this isn't UTF-32...

Re: ByteLen() and Unicode

Posted: Sat May 04, 2019 9:10 pm
by msu
I should have looked at the utf8 table before. :oops:
Only from position 128, the characters are 2 bytes in size ....