Asc("€") not returning unicode value

Just starting out? Need help? Post your questions and find answers here.
TomyB
User
User
Posts: 18
Joined: Sun Feb 26, 2012 5:18 pm

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

Post 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.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

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

Post 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.
Post Reply