PQexecParams and wchar_t

Поиск
Список
Период
Сортировка
От Rob
Тема PQexecParams and wchar_t
Дата
Msg-id 736324.21426.qm@web54606.mail.re2.yahoo.com
обсуждение исходный текст
Ответы Re: PQexecParams and wchar_t  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
Re: PQexecParams and wchar_t  (slakr <ac@esilo.com>)
Список pgsql-interfaces
Does anyone have an example of passing a UTF8 wchar_t character string to PQexecParams() working? For the life of me I
can'tget it to work. The best I've gotten is the first character of the string is added to my table.<br /><br />The
databaseuses UTF8 encoding, but no combination of parameters to PQexecParams that I've found gets the whole string into
myfunction. I'm guessing that since that PQexecParams takes an array of const char * that the interface has no way to
guessthat the parameters are actually wide characters. And since (for english encoding) the data is stored in the first
byteof the two byte character, the interface only grabs the first byte of the wide string, thinking the second byte is
anull terminator.<br /><br />Specifying the length of the wchar parameter makes no difference. Is there any way to tell
theinterface that the parameter is a wide character string?<br /><br />Any help greatly appreciated.<br /><br />Rob<br
/><br/><p><hr size="1" /><a
href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint
customers</a>who are looking for what you sell.  

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: Query performance
Следующее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: PQexecParams and wchar_t