Re: UTF8 encoding and non-text data types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Medi Montaseri" <montaseri(at)gmail(dot)com>
Cc: "Steve Midgley" <public(at)misuse(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: UTF8 encoding and non-text data types
Date: 2008-01-14 22:41:23
Message-ID: 7578.1200350483@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Medi Montaseri" <montaseri(at)gmail(dot)com> writes:
> insert into t1 (c1, cost) values ('tewt', 1234)
> this works find....
> insert into t1 (c1, cost) values ('&#1588;&#1583;',
> &#1777;&#1778;&#1779;&#1780;)
> DBD::Pg::db do failed: ERROR: syntax error at or near ";" at character 59,

Well, you've got two problems there. The first and biggest is that
&#NNN; is an HTML notation, not a SQL notation; no SQL database is going
to think that that string in its input is a representation of a single
Unicode character. The other problem is that even if this did happen,
code points 1777 and nearby are not digits; they're something or other
in Arabic, apparently. So I think you've got a problem in your Unicode
conversions as well as a notational problem.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joe 2008-01-14 23:03:17 Re: UTF8 encoding and non-text data types
Previous Message Steve Midgley 2008-01-14 20:52:38 Re: UTF8 encoding and non-text data types