BUG #1576: Function UPPER does not give back the awaited results

Started by Sergio Luis Sánchezabout 21 years ago2 messagesbugs
Jump to latest
#1Sergio Luis Sánchez
sluis@tissat.es

The following bug has been logged online:

Bug reference: 1576
Logged by: Sergio Luis Sánchez
Email address: sluis@tissat.es
PostgreSQL version: 7.4.3 and 8.0.1
Operating system: linux (7.4.3) and WinXP (8.0.1)
Description: Function UPPER does not give back the awaited results
Details:

Hi.

I'm from Spain, and I am using a PostgreSQL as database system. Sorry for my
English.

I launch a select with the upper function to retrieve a text in capital
letters. When I launch the function to text with accents (Usual in Spanish
language), I get the marked words in lowercase, and it's wrong.

To test it I launh this query:

select upper('aeiouáéíóúàèìòù');

And the result was: "AEIOUáéíóúàèìòù", when it must be
"AEIOUÁÉÍÓÚÀÈÌÒÙ".

I try this function with UNICODE and LATIN1 encodings, and I retrieve same
result.

I reproduce the error in this two versions of Postgres:
- PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3
20030502 (Red Hat Linux 3.2.3-24)
- PostgreSQL 8.0.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)

NOTE: lower function fails too with marked words.

Thanks in advance

#2Magnus Hagander
magnus@hagander.net
In reply to: Sergio Luis Sánchez (#1)
Re: BUG #1576: Function UPPER does not give back the awaited results

Bug reference: 1576
Logged by: Sergio Luis Sánchez
Email address: sluis@tissat.es
PostgreSQL version: 7.4.3 and 8.0.1
Operating system: linux (7.4.3) and WinXP (8.0.1)
Description: Function UPPER does not give back the
awaited results
Details:

Hi.

I'm from Spain, and I am using a PostgreSQL as database
system. Sorry for my
English.

I launch a select with the upper function to retrieve a text in capital
letters. When I launch the function to text with accents
(Usual in Spanish
language), I get the marked words in lowercase, and it's wrong.

To test it I launh this query:

select upper('aeiouáéíóúàèìòù');

And the result was: "AEIOUáéíóúàèìòù", when it must be
"AEIOUÁÉÍÓÚÀÈÌÒÙ".

I try this function with UNICODE and LATIN1 encodings, and I
retrieve same result.

It shouldn't work in UNICODE - see http://pginstaller.projects.postgresql.org/FAQ_windows.html#2.6.

It should work in LATIN1 though. I've never had any problems with that part (use it for swedish chars all the time). Make sure you really switched the server side encoding (new initdb), and not just the client side.

//Magnus