Page 2 of 2

Re: Asc("€") not returning unicode value

Posted: Mon Sep 15, 2014 5:49 pm
by TomyB
The Ascii-Table in the IDE is also missin alot of character values. for 128 to 160. in older (ascii) ide's the values are present.

Re: Asc("€") not returning unicode value

Posted: Mon Sep 15, 2014 6:05 pm
by Tenaja
Little John wrote:
Tenaja wrote:I am trying to write a ContainsUnicode function, but asc() is giving me small (i.e. first-byte) values, and not the expected unicode values:

Code: Select all

Debug Asc(Chr(401))	; prints: 145
Debug Asc(Chr(956))	; prints: 188
Same here (PB 5.23 LTS) if and only if in the IDE file format is set to plain text.
Better set it to Utf8. :-)
(should actually read UTF-8 BTW)
Yes, good catch. Changed; now it works.