ByteLen() and Unicode

Report any Hollywood bugs here
Post Reply
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

ByteLen() and Unicode

Post 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. :?:
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ByteLen() and Unicode

Post by airsoftsoftwair »

Huh? "H" is one byte in UTF-8... this isn't UTF-32...
User avatar
msu
Posts: 71
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: ByteLen() and Unicode

Post by msu »

I should have looked at the utf8 table before. :oops:
Only from position 128, the characters are 2 bytes in size ....
Post Reply