pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Krajmalnik <kraj@servoyant.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: upper and UTF-8
Date: Mon, 26 Jul 2010 15:47:13 -0600
Message-ID: <F4E6A2751A2823418A21D4A160B689886147CC@fletch.stackdump.local> (raw)
In-Reply-To: <AANLkTimgeBFoRW=xDO_aXnhjmcKhLQWWfFT43X3Deb_g@mail.gmail.com>
References: <F4E6A2751A2823418A21D4A160B689886147CA@fletch.stackdump.local>
	<AANLkTi=EeD8YZd9T1FaTGZOVGsSWzZEoog7R+Xc63HYT@mail.gmail.com>
	<F4E6A2751A2823418A21D4A160B689886147CB@fletch.stackdump.local>
	<AANLkTimgeBFoRW=xDO_aXnhjmcKhLQWWfFT43X3Deb_g@mail.gmail.com>

Unfortunately, the database has to accept data in multiple languages, since it is a SaaS offering.
It is not a big deal - I just found it interesting that it did not uppercase the accented letters.
The reason I came across it is that I created a table of all the ISO countries.  I had found a NySQL script which created it, and it had the fields in both upper case and mixed case.  Since our platform is multi-lingual, we expanded the table to add the language code and started adding the translation.  After I finished the translation, I figured for consistency I would upper case the one field into the other, and this is where I saw the inconsistency.
Operationally, it does not affect me in any way - but I found it strange that it did not handle the accented characters.
For now we are keeping the column to facilitate the translation to other languages - ultimately it will be dropped.


> -----Original Message-----
> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> Sent: Monday, July 26, 2010 3:39 PM
> To: Benjamin Krajmalnik
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] upper and UTF-8
> 
> I'd try creating a db with en_US or even better whatever is spanish
> encoding for lc_collate and see what happens.
> 
> On Mon, Jul 26, 2010 at 3:18 PM, Benjamin Krajmalnik
> <kraj@servoyant.com> wrote:
> > CREATE DATABASE ishield
> >  WITH OWNER = postgres
> >       ENCODING = 'UTF8'
> >       LC_COLLATE = 'C'
> >       LC_CTYPE = 'C'
> >       CONNECTION LIMIT = -1;
> >
> >
> >> -----Original Message-----
> >> From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
> >> Sent: Monday, July 26, 2010 3:17 PM
> >> To: Benjamin Krajmalnik
> >> Cc: pgsql-admin@postgresql.org
> >> Subject: Re: [ADMIN] upper and UTF-8
> >>
> >> On Mon, Jul 26, 2010 at 3:03 PM, Benjamin Krajmalnik
> >> <kraj@servoyant.com> wrote:
> >> > I just used the upper(text) function on a database which is utf8
> >> encoded and
> >> > which has spanish text.
> >> >
> >> > All of the regular characters were properly converted, except for
> >> characters
> >> > which had accents.
> >>
> >> What are your various LC_* variables for that database?
> >>
> >> --
> >> To understand recursion, one must first understand recursion.
> >
> 
> 
> 
> --
> To understand recursion, one must first understand recursion.



view thread (11+ messages)  latest in thread

Message-ID: <F4E6A2751A2823418A21D4A160B689886147CC@fletch.stackdump.local>
Permalink:  ../F4E6A2751A2823418A21D4A160B689886147CC@fletch.stackdump.local/
Also on:    postgresql.org/message-id/F4E6A2751A2823418A21D4A160B689886147CC@fletch.stackdump.local

 · 

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-admin@postgresql.org
  Cc: kraj@servoyant.com, scott.marlowe@gmail.com
  Subject: Re: upper and UTF-8
  In-Reply-To: <F4E6A2751A2823418A21D4A160B689886147CC@fletch.stackdump.local>

* 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