Thread: R: [pgsql-zh-general] (solved - 谢谢) Chinese in Postgres

R: [pgsql-zh-general] (solved - 谢谢) Chinese in Postgres

From
"ciifrancesco@tiscali.it"
Date:
Eureka.
The problem is solved.

Bambo:
> I guess you forget to convert
you string to UTF-8 before insert.

No, too many conversions :)

The
fact is that in the source code the query was casted to UnicodeString,
because of previous requirements on the project:

//tmp is a char* and
contains the query
uniQueryStr = UnicodeString(tmp); //useless

executeMyQuery(uniQueryStr); //this is wrong!!
executeMyQuery(tmp);
//that's right :). TODO never use UnicodeString anymore...

I already
tried to avoid that cast, but when the target was compiled on the Linux
server (that's why i used putty) the executable was not overwritten,
for some weird reason.
So the executable was not 100% according to the
source code; I was always used to compile code with Visual studio or
Eclipse so i wasn't aware of such possibility.
To make it working, I
just removed all the old files and made a long, full and fresh build.


Sorry for making you loose time.

XieXie / 谢谢,
Francesco


Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato
30€ di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/