Hi all,

Quick recap, I did read this - https://support.dataaccess.com/Forum...acter-function

I have a string that looks like this



If you copy and paste that to notepad, and save it as UTF 8 (utf8.txt), you get the following bytes (without BOM)
41 CC 84

(a character "A" with a overline combined character |CI$84CC, or 33996). So far so good

If you copy and paste that to notepad, and save it as UTF 16 LE (utf16.txt), you get the following bytes (without BOM)
41 00 04 03

(a character "A" with a overline combined character |CI$0304, or 772). So far so good

When I read the UTF 8 file to a string and do a showln, it displays the correct string
Code:
String s
Direct_Input "utf8.txt" // Reading 41 CC 84
Readln s
Showln (Ascii(Mid(s,1,2))) // I get 772
Showln s // Shows the string Ā correctly
Close_Input
Since DF20+ are all dealing with UTF 8 strings, why are the ASCII / Character functions dealing with UTF 16 code points? Why should I get 772 instead of 33996 when I called the ASCII function?

Frank Cheng