The following bug has been logged online:
Bug reference: 3323
Logged by: Eduardo Santos
Email address: eduardo.edusantos@gmail.com
PostgreSQL version: 8.2.4
Operating system: Windows
Description: Wrong charset for the lower and upper functions
Details:
When you have the latin character ç and use the lower or the upper
function, instead of return the approprite character, it returns the oposite
one, so the comparisons in the whole DB are wrong. If you have a word such
as Serviço, and you use the lower function, the result is serviÃo, instead
of serviço. the other side is also true: if you use upper in the same eord,
the result is SERVIçO, instead of SERVIÃO.
select upper('Serviço');
Expected result: SERVIÃO
Actual result: SERVIçO
select lower('Serviço');
Expected result: serviço
Actual result: serviÃo