pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Medi Montaseri <montaseri@gmail.com>
Cc: Steve Midgley <public@misuse.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: UTF8 encoding and non-text data types
Date: Mon, 14 Jan 2008 17:41:23 -0500
Message-ID: <7578.1200350483@sss.pgh.pa.us> (raw)
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>

"Medi Montaseri" <montaseri@gmail.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



view thread (15+ messages)  latest in thread

Message-ID: <7578.1200350483@sss.pgh.pa.us>
Permalink:  ../7578.1200350483@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7578.1200350483@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, montaseri@gmail.com, public@misuse.org
  Subject: Re: UTF8 encoding and non-text data types
  In-Reply-To: <7578.1200350483@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox