[V4RB] Switching to RB 5

Claudius Sailer Claudius at sailer-online.de
Wed Apr 30 06:30:56 CDT 2003


Am Dienstag, 29.04.03 um 15:41 Uhr schrieb Peter De Berdt:

> i just tried to convert a project made in RB 4.5.3 to RB 5.1. After 
> some minor bugfixing, all runs well, except for some encoding issue.
>
> Special characters like é, è, à are either stored wrong or fetched 
> wrong. They show up as ©A5 and stuff like that. What do I have to do 
> to get things right?


Before you insert something in the database, you have to convert it to 
ASCII (UniCodeToAscII). Write a methode in your Project which is doing 
that and call alll the time you want to insert or change something in 
the database.
Do the same convertation with every SQLString before you call 
SQLExecute and SQLSelect. Do it this way:

mydatabase.SQLSelect(UniCodeToASCII(SQLString))

mydatabase.SQLExecute(UniCodeToASCII(SQLString))


function UniCodeToASCII(Char as string) string
      return char.ConvertEncoding( Encodings.SystemDefault )
end function


bye


Claudius


More information about the Valentina mailing list