Обсуждение: Bug #705: Invalid UNICODE character sequence found (0xc236)

Поиск
Список
Период
Сортировка

Bug #705: Invalid UNICODE character sequence found (0xc236)

От
pgsql-bugs@postgresql.org
Дата:
Peter Czulak (pczulak@cybercom.net) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Invalid UNICODE character sequence found (0xc236)

Long Description
PostgreSQL version 7.2.1
OS: RedHat Linux 7.2
Platform: IBM 220 server
Some insert statements are failing when inserted into the UNICODE encoded database. The same insert statement works on
SQL_ASCIIand Latin9 encoded database.
 
When a file name was changed for the ftp_file column (see the code example) from 300319TLOG07042002.zip to
X300319TLOG07042002.zipthen the
 
insert statement worked in the UNICODE encoded database.
Some of the insert messages with identical structure but different names also starting with integer worked.

Data base was build on the server with enable multibyte option
also init db was initialized with -E UNICODE
and database was created with -E UNICODE.

Thank you
Peter Czulak

Sample Code
INSERT INTO ftp_log_t (ftp_log_source, ftp_from_site_id, ftp_file_status, ftp_file, ftp_log_date, ftp_file_date,
ftp_file_size,ftp_insert_date) VALUES ('DD',300319,'ST','c:\Inetpub\FTPRoot\300319\300319TLOG07042002.zip','07-04-2002
14:30:36','2002-07-0414:00',43514,'2002-07-05 08:22:43')
 

    CREATE TABLE ftp_log_t
    (ftp_id integer DEFAULT nextval('ftp_log_seq') NOT NULL,
    ftp_log_source varchar(64) NOT NULL,
     ftp_from_site_id integer NOT NULL,
    ftp_file_status varchar(32) NOT NULL,
     ftp_file varchar(256) NOT NULL,
     ftp_file_size integer,
     ftp_log_date timestamp NOT NULL,
     ftp_file_date timestamp,
     ftp_insert_date timestamp NOT NULL,
     PRIMARY KEY (ftp_id));



No file was uploaded with this report

Re: Bug #705: Invalid UNICODE character sequence found

От
Tatsuo Ishii
Дата:
> Short Description
> Invalid UNICODE character sequence found (0xc236)

Are you sure that above error message is for the below example?
I got: Invalid UNICODE character sequence found (0xc033)

> INSERT INTO ftp_log_t (ftp_log_source, ftp_from_site_id, ftp_file_status, ftp_file, ftp_log_date, ftp_file_date,
ftp_file_size,ftp_insert_date) VALUES ('DD',300319,'ST','c:\Inetpub\FTPRoot\300319\300319TLOG07042002.zip','07-04-2002
14:30:36','2002-07-0414:00',43514,'2002-07-05 08:22:43') 

I don't know what data you actually want to store, but
for PostgreSQL \3003 means "octal 300 + ascii '3'" == 0xc033, which is
apparently wrong UTF-8 sequence. So PostgreSQL behaves as expected.
--
Tatsuo Ishii