Re: Encoding using the Frontend/Backend Protocol TCP/IP

From: Raimon Fernandez <coder(at)montx(dot)com>
To: Kovalevski Andrei <kovalevski(dot)andrei(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Encoding using the Frontend/Backend Protocol TCP/IP
Date: 2009-11-19 17:13:42
Message-ID: A86C9188-4DAC-4EC4-86BD-0B483287BC71@montx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces


On 19/11/2009, at 17:27, Kovalevski Andrei wrote:

> Hi
>
> could it be that you have errors in your UTF8 string? For example you might use UTF16 encoding, it can explain why some characters force errors but others are not.

It only happens with values like àéïçñ I think UTF8 can handle this ...

> Can you post here the string and its' encoded version?
>

Original string:
Update transactions set description='Test ValuesdÇ' where id=113

UTF:

Update transactions set description='Test ValuesdÇ' where id=113
5100000046557064617465207472616E73616374696F6E7320736574206465736372697074696F6E3D27546573742056616C75657364C387272077686572652069643D313133

It has also the header Q and the length ...

thanks,

regards,

r.

> Raimon Fernandez wrote:
>> Hello,
>>
>>
>> I'm trying to send some strings that have chars outside from standar ascii, like çñàèó
>>
>> Once I'm connected, the client and server both uses UT8Encoding.
>>
>> And I'm sending all the strings encoded in UTF8.
>>
>> At least the received ones are working, as I get the text exactly as it is, with special chars.
>>
>> But when I'm trying to update a row using some of them, I'm getting an error:
>> ERROR
>> 08P01
>> Invalid string in message
>> pqformat.c
>> 691
>> pq_getmstring
>> Invalid Front End message type 0
>> postgres.c
>> 408
>> socketbackend
>> you have been disconected
>>
>> How should I encode ????
>>
>>
>> thanks,
>>
>> regards,
>>
>>
>> r.
>>
>>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Bailey 2009-11-19 17:15:35 Re: obtaining ARRAY position for a given match
Previous Message Sam Mason 2009-11-19 17:11:09 Re: obtaining ARRAY position for a given match

Browse pgsql-interfaces by date

  From Date Subject
Next Message Raimon Fernandez 2009-11-19 18:01:53 Re: Encoding using the Frontend/Backend Protocol TCP/IP
Previous Message Kovalevski Andrei 2009-11-19 16:27:49 Re: Encoding using the Frontend/Backend Protocol TCP/IP