pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Michel POURE <jm.poure@freesurf.fr>
To: Patrice Hédé <phede-ml@islande.org>
To: pgsql-general@postgresql.org
Subject: Re: [HACKERS] UTF-8 safe ascii() function
Date: Sun, 19 May 2002 12:44:56 +0200
Message-ID: <200205191244.56474.jm.poure@freesurf.fr> (raw)
In-Reply-To: <20020519114413.2265b70e.phede-ml@islande.org>
References: <200205181853.19420.jm.poure@freesurf.fr>
	<20020519114413.2265b70e.phede-ml@islande.org>

Dear Patrice,

Thank you very much. This will save the lives of Java users.

> I don't think the function I did is useful as such. It would be better
> to make a function that converts the whole string or something.

Yes, this would save the lives of some Javascript users. Java Unicode notation 
is the only Unicode understood by Javascript.

> By the way, what is the encoding for Java Unicode ? is it always "\u"
> followed by 5 hex digits (in which case your example is wrong) ? Then,
> it shouldn't be too difficult to make the relevant function, though I'm
> wondering if the Java programme would convert an incoming '\' 'u' '0'
> '0' '2' '3' '3' to the corresponding UCS2/UTF16 character ?

Java Unicode notation is not case sensitive ('\u' = '\U') and is followed by 
an hexadecimal value.

> Maybe we should have some similar input (and output ?) functionality in
> psql, but then I would much prefer the Perl way, which is
> \x{hex_digits}, which is unambiguous.

This would be perfect. We should also handle the HTML unicode nation :
&#{dec_digits} and &#x{hex_digits} as it is unambiguous.

Cheers,
Jean-Michel





view thread (6+ messages)  latest in thread

Message-ID: <200205191244.56474.jm.poure@freesurf.fr>
Permalink:  ../200205191244.56474.jm.poure@freesurf.fr/
Also on:    postgresql.org/message-id/200205191244.56474.jm.poure@freesurf.fr

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jm.poure@freesurf.fr, phede-ml@islande.org, pgsql-general@postgresql.org
  Subject: Re: [HACKERS] UTF-8 safe ascii() function
  In-Reply-To: <200205191244.56474.jm.poure@freesurf.fr>
  References: <200205181853.19420.jm.poure@freesurf.fr> <20020519114413.2265b70e.phede-ml@islande.org> <200205191244.56474.jm.poure@freesurf.fr>

* 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