Roman Shchugarev wrote:
> Hello libpqxx-general,
> 
>   I am developing client application under Win32  using
>   Visual Studio .NET 2k3 the problem I'm facing is:
>   I am not able to get Unicode data from Postgres DB server. What
>   might be the problem?
>   When compiling with unicode libraries, the linker says that there
>   is an undefined external link ....
>   the code that generates this error is:
>   /*
>  for (result::size_type i = 0; i < R.size(); ++i)
>     {
>                 wstring xxx;
>                 R[i][3].to(xxx);
>  ---- at this point I get an error ....
>   //               m_klientu_koks.InsertItem(xxx.c_str());
>   */
> 
>   maybe there is another way of getting field's data, I am new with
>   libpqxx and need some help.

In general, in these cases it is useful if you also mail the error that 
the compiler or linker shows you.

BTW, in this case I can give you a hint for the answer: libpqxx doesn't 
support wstring. You'll probably be able to get Unicode out, but it'll 
have to be retrieved using std::string, not std::wstring, and it will be 
UTF-8 encoded. This is just my first guess -- Jeroen may be able to tell 
you more.

Cheers,
Bart
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to