Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 5A8222E0184 for ; Mon, 14 Jan 2008 18:41:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 43993-08 for ; Mon, 14 Jan 2008 18:41:22 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1D29B2E00B9 for ; Mon, 14 Jan 2008 18:41:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0EMfN8U007579; Mon, 14 Jan 2008 17:41:24 -0500 (EST) To: "Medi Montaseri" cc: "Steve Midgley" , pgsql-sql@postgresql.org Subject: Re: UTF8 encoding and non-text data types In-reply-to: <8078a1730801141243o63676d02mdb1e3a539679f79f@mail.gmail.com> References: <20080113222706.73BE416DA2AB@mx1.hub.org> <478aea79.03098c0a.5f32.ffffa6e4SMTPIN_ADDED@mx.google.com> <8078a1730801141101j4bc0dc4chdffee5eaebdb99da@mail.gmail.com> <20080114201831.B34BA2E2CC4@postgresql.org> <8078a1730801141243o63676d02mdb1e3a539679f79f@mail.gmail.com> Comments: In-reply-to "Medi Montaseri" message dated "Mon, 14 Jan 2008 12:43:02 -0800" Date: Mon, 14 Jan 2008 17:41:23 -0500 Message-ID: <7578.1200350483@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/120 X-Sequence-Number: 29973 "Medi Montaseri" writes: > insert into t1 (c1, cost) values ('tewt', 1234) > this works find.... > insert into t1 (c1, cost) values ('شد', > ۱۲۳۴) > 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