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 14:22:52 -0500
Message-ID: <23645.1200338572@sss.pgh.pa.us> (raw)
In-Reply-To: <8078a1730801141101j4bc0dc4chdffee5eaebdb99da@mail.gmail.com>
References: <20080113222706.73BE416DA2AB@mx1.hub.org>
	<478aea79.03098c0a.5f32.ffffa6e4SMTPIN_ADDED@mx.google.com>
	<8078a1730801141101j4bc0dc4chdffee5eaebdb99da@mail.gmail.com>

"Medi Montaseri" <montaseri@gmail.com> writes:
> More specifically, I am using HTML, Perl and PG. So from the HTML point of
> view a textfield is just some strings. So my user would enter 12345 but
> expressed in UTF8. Perl would get this and use DBI to insert it into PG

> What I am experiencing now is that DB errors that I am trying to insert an
> incorrect data into column "cost" which is numeric and the data is coming in
> from HTML in UTF8

> Mybe I have to convert it to ASCII numbers in Perl before inserting  them
> into PG

Uh, there is *no* difference between the ASCII and UTF8 representations
of decimal digits, nor of any other character that would be allowed in
input for a decimal field.  I can't tell what your problem really is,
but you have certainly misunderstood or misexplained it.

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <23645.1200338572@sss.pgh.pa.us>
Permalink:  ../23645.1200338572@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23645.1200338572@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: <23645.1200338572@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