some latin2 characters not correctly read from script - Mailing list pgsql-bugs

From Jan Poslusny
Subject some latin2 characters not correctly read from script
Date
Msg-id 3FAB7426.10602@gingerall.cz
Whole thread Raw
List pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               :   Jan Poslusny
Your email address      :   pajout@gingerall.cz


System Configuration
---------------------
  Architecture (example: Intel Pentium)         :    Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)  :    Linux 2.4.20-8

  PostgreSQL version (example: PostgreSQL-7.3.4):    PostgreSQL-7.3.4

  Compiler used (example:  gcc 2.95.2)          :    gcc 3.2.2


Please enter a FULL description of your problem:
------------------------------------------------
I initialized dbcluster with --locale=cs_CZ.UTF-8 and created database
with --encoding=unicode. Following script generates error:
-- -*- coding: iso-8859-2 -*-
set client_encoding to LATIN2;
create table t (txt text);
begin;
--inserted character is latin small letter r with caron, coded in iso
8859-2; escaped as \370
insert into t values ('ř');
insert into t values ('\\@');
commit;
-- end of script
, generates
SET
CREATE TABLE
BEGIN
psql:test.sql:7: invalid command \
psql:test.sql:9: ERROR:  parser: unterminated quoted string at or near "'
commit;" at character 52
. I think this is a bug, because the script is syntactically OK and work
fine on database with server_encoding=latin2.

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
 Above example is reproducible.




If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
 Perhaps lc_ctype=cs_CZ.UTF-8 is used when script is read.

pgsql-bugs by date:

Previous
From: "Eric Jain"
Date:
Subject: Can't create index on text column
Next
From: Palle Girgensohn
Date:
Subject: Re: PostgreSQL client has problems when libbind is installed