From: | Daniel Schuchardt <d(dot)schuchardt(at)prodat-sql(dot)de> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Subject: | Re: invalid byte sequence for encoding |
Date: | 2009-09-13 22:36:37 |
Message-ID: | 4AAD73F5.1000202@prodat-sql.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I know you are true with definition's and standards, however, that code
works for about 6 years ;o)
Well, we will change our parser behavoir. We will check out that
standard_conforming_strings parameter too but i see a lot of problems
with our backup and restore system (plain text pg_dump's) and other points.
All in all will Postgres81 understand this E'' (\\0) escape chars too?
Or do we have to make a several version for older Postgres versions?
Thanks a lot for your hints,
Daniel.
Peter Eisentraut schrieb:
> On sön, 2009-09-13 at 22:21 +0200, Daniel Schuchardt wrote:
>> First:In Postgres81 everything is working fine.
>
> In general, older versions of PostgreSQL treated encoding issues much
> mroe loosely, which subsequently lead to user errors, bugs, and
> confusion. Later versions are more strict. Therefore, experience
> dictates that "$oldversion is working fine" often really means "your
> application code was abusing definitional gaps and bugs".
>
>> (((with our parser:
>> UPDATE art SET ak_auftxt= '*', ak_auftxt_rtf=
>> '{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0
>> Arial;}}\r\n\\viewkind4\\uc1\\pard\\lang1031\\fs20 *\r\n\\par }\r\n\0'
>> WHERE dbrid=204800
>> ))))
>
> At the very least, you should escape the \0 to \\0. And then put E''
> around the string. The answer recommended elsewhere to set
> standard_conforming_strings to true will also work, but might break
> other code that you have currently running. Read its documentation
> carefully.
>
>
--
Daniel Schuchardt
/Softwareentwicklung/
/http://www.prodat-sql.de/
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Schuchardt | 2009-09-13 22:38:01 | Re: invalid byte sequence for encoding |
Previous Message | Peter Eisentraut | 2009-09-13 22:21:46 | Re: invalid byte sequence for encoding |