dbTalk Databases Forums  

[BUGS] BUG #2193: INITCAP and LOWER/UPPER string conversion error

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2193: INITCAP and LOWER/UPPER string conversion error in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andras Got
 
Posts: n/a

Default [BUGS] BUG #2193: INITCAP and LOWER/UPPER string conversion error - 01-21-2006 , 07:56 PM







The following bug has been logged online:

Bug reference: 2193
Logged by: Andras Got
Email address: andrej1981 (AT) gmail (DOT) com
PostgreSQL version: 8.0.4, 8.1.1
Operating system: FreeBSD and Linux
Description: INITCAP and LOWER/UPPER string conversion error
Details:

Hi,

8.0.4
I'm trying to select with LOWER/UPPER and INITCAP but they return bad values
after hungarian accentuated letters (e.g: é á ű ú ő ó ü). The bad is
value is a capital letter. This makes almost impossible to compare strings
from an input with ones in the table. Also LOWER returns a big capital
letter for the first letter of the word. UPPER doesn't really converts some
chars to uppercase, e.g: ó, á, é.

I'd like to something like this with PHP:
"SELECT id FROM table WHERE LOWER(name) = '".strtolower($name)."';

I tried with LATIN2 encoding and the same happened.

8.1.1
The first capital letter probleml looks like to be solved, but the
accentuated letter problem still exists.

Thank you for your time,
Andrej

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2193: INITCAP and LOWER/UPPER string conversion error - 01-21-2006 , 10:35 PM






"Andras Got" <andrej1981 (AT) gmail (DOT) com> writes:
Quote:
I'm trying to select with LOWER/UPPER and INITCAP but they return bad values
after hungarian accentuated letters (e.g: é á ű
ú ő ó ü).
Are you sure you are using the right locale and database encoding?
If so, what are they?

There are some locale-related fixes in the latest releases (8.0.6
and 8.1.2), though I'm not sure if they address your problem.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Andras Got
 
Posts: n/a

Default Re: [BUGS] BUG #2193: INITCAP and LOWER/UPPER string conversion error - 01-22-2006 , 09:53 AM



I solved this, this was a local issue. I tried to cancel my letter, but noo=
ne bothered with the=20
cancelling mail.

Yes this was a locale mixup. Sorry.

Regards,
Andrej


Tom Lane =EDrta:

Quote:
"Andras Got" <andrej1981 (AT) gmail (DOT) com> writes:
=20
I'm trying to select with LOWER/UPPER and INITCAP but they return bad val=
ues
after hungarian accentuated letters (e.g: =E9 =E1 =FB
=FA =F5 =F3 =FC).
=20
=20
Are you sure you are using the right locale and database encoding?
If so, what are they?
=20
There are some locale-related fixes in the latest releases (8.0.6
and 8.1.2), though I'm not sure if they address your problem.
=20
regards, tom lane
=20
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.