Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7BEC02E380A for ; Mon, 14 Jan 2008 19:03:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 43028-10 for ; Mon, 14 Jan 2008 19:03:25 -0400 (AST) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id 2588E2E385B for ; Mon, 14 Jan 2008 19:03:26 -0400 (AST) Received: from [192.168.2.5] ([71.180.222.218]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JUN00DQLPG6XQT4@vms040.mailsrvcs.net> for pgsql-sql@postgresql.org; Mon, 14 Jan 2008 17:04:57 -0600 (CST) Date: Mon, 14 Jan 2008 18:03:17 -0500 From: Joe Subject: Re: UTF8 encoding and non-text data types In-reply-to: <7578.1200350483@sss.pgh.pa.us> To: Tom Lane Cc: Medi Montaseri , Steve Midgley , pgsql-sql@postgresql.org Message-id: <478BEA35.1010405@freedomcircle.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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> <7578.1200350483@sss.pgh.pa.us> User-Agent: Thunderbird 2.0.0.9 (X11/20071216) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/121 X-Sequence-Number: 29974 Tom Lane wrote: > "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. > Precisely. 1777 through 1780 decimal equate to code points U+06F1 through U+06F4, which correspond to the Arabic numerals 1 through 4. Joe