From: | Leandro Fanzone <leandro(at)hasar(dot)com> |
---|---|
To: | Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Translate problems |
Date: | 2002-07-11 18:56:23 |
Message-ID: | 3D2DD4D7.5050705@hasar.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Well, it requires multibyte: when I tried to run it in my database, I had
ERROR: Multi-byte support is not enabled.
Manuel Sugawara wrote:
>Leandro Fanzone <leandro(at)hasar(dot)com> writes:
>
>
>
>>I have a table with a text field:
>>
>>
>>
>[...]
>
>
>>SELECT myfield FROM mytable
>>WHERE TRANSLATE(LOWER(myfield), '[accented vowels collection]', '[respetive
>>non-accented vowels]')
>>
>>
>
>I faced the same problem and, equivalente to your approach, I used a
>combination of to_ascii and upper/lower:
>
>test=# select to_ascii('áéíóúñ');
> to_ascii
>----------
> aeioun
>(1 row)
>
>create or replace function to_uascii( text ) as '
>select upper(to_ascii($1)) as result
>' language 'sql';
>
>I'm wondering whatever this approach works for multibyte encodings
>(UTF-8 and such).
>
>Regards,
>Manuel.
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Manuel Sugawara | 2002-07-11 18:59:44 | Re: Translate problems |
Previous Message | Manuel Sugawara | 2002-07-11 18:49:57 | Re: Translate problems |