Lazarus
Announcements => Third party => Topic started by: fercosta80 on June 10, 2016, 01:04:30 pm
-
Hi.
I developed an application that accesses an Oracle database. When I run the application on my computer, everything works normally. But when I run on another computer, the characters 'é', 'í', 'ã' are not shown properly. In their place appear '??'. I need help. I've tried several conversion functions and nothing worked (AnsiToUTF8, CP1252ToUTF8 etc).
Thanks.
-
You should query the codepage of the USER first. Then in your code determine if and when conversion is necessary.
I assume you have a reasonable codepage/character encoding for your database (like UTF8) to store your data: not FPC level but database level.
-
Set the CharSet property of the TOracleConnection component, so it match the database character encoding. Ideally it should be UTF8.
-
Problem solved!
The solution was as follows: on the computer where the software will run, created an environment variable in Windows called NLS_LANG and put to value the string BRAZILIAN PORTUGUESE_BRAZIL.AL32UTF8. The characters now appear correctly in the application. :D :D :D
Thanks to GetMem and Thaddy for your answers.