Oemtoansi ERROR ??????
Posted: Fri Jun 01, 2007 8:52 am
Hello,
Using code page "FR" , i try to convert characters as à , é , ç , è to uppercase
i.e.
# include "fivewin.ch"
i := 233
? STR(i,3) + " : " + CHR(i) + " " + CHR(i-32)+"/"+UPPER(CHR(i))
Result :
233 : é É/é , Upper doesn't convert , É exists ! , but E should be better
i := 130
? OemToAnsi(STR(i,3) + " : " + CHR(i) + " " + CHR(i-32)+"/"+UPPER(CHR(i)))
Result :
130 : é b/E , i like this conversion to E but, In upper() is chr(i) not set to ansi !!!
MsgInfo( OemToAnsi(CHR(130)) , ASC(OemToAnsi(CHR(130))) , UPPER(OemToAnsi(CHR(130))) , UPPER(CHR(130)))
So to convert "é" , we have to do :
UPPER(AnsiToOem("é"))
Frank
Using code page "FR" , i try to convert characters as à , é , ç , è to uppercase
i.e.
# include "fivewin.ch"
i := 233
? STR(i,3) + " : " + CHR(i) + " " + CHR(i-32)+"/"+UPPER(CHR(i))
Result :
233 : é É/é , Upper doesn't convert , É exists ! , but E should be better
i := 130
? OemToAnsi(STR(i,3) + " : " + CHR(i) + " " + CHR(i-32)+"/"+UPPER(CHR(i)))
Result :
130 : é b/E , i like this conversion to E but, In upper() is chr(i) not set to ansi !!!
MsgInfo( OemToAnsi(CHR(130)) , ASC(OemToAnsi(CHR(130))) , UPPER(OemToAnsi(CHR(130))) , UPPER(CHR(130)))
So to convert "é" , we have to do :
UPPER(AnsiToOem("é"))
Frank