| From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Cc: | Benjamin Krajmalnik <kraj(at)servoyant(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: upper and UTF-8 |
| Date: | 2010-07-27 03:12:08 |
| Message-ID: | AANLkTikRCdVyppWTztO1ocY9DBd1jQWPecG_K9yZLR6G@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Mon, Jul 26, 2010 at 8:09 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Benjamin Krajmalnik's message of lun jul 26 17:03:54 -0400 2010:
>> 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.
>
> FWIW it works fine for me:
>
> alvherre=# show lc_collate ;
> lc_collate
> ------------
> es_CL.utf8
> (1 fila)
>
> alvherre=# select upper('benjamín');
> upper
> ----------
> BENJAMÍN
> (1 fila)
>
> I suspect that the problem is an incorrect client_encoding setting.
Yeah, OP had set lc_collate to C under the mistaken impression that
collation controlled the character sets you could insert into the
database. If you create a db with lc_collate='C' then the upper only
works on basic ascii characters near as I can tell.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2010-07-27 03:36:33 | Re: upper and UTF-8 |
| Previous Message | Alvaro Herrera | 2010-07-27 02:09:36 | Re: upper and UTF-8 |