Forum OpenACS Development: Response to PostgreSQL upper() / lower() functions and LATIN2 charset

Sorry, I should have thought that the same problem with iso-8859-1 characters would arise in this site.

This is what i meant to write (this time using "á" expressions)

  • Now, if i do a select id, test, upper(test) as upper, lower(test) as lower from encoding i get:
    id - test - upper - lower
    --------------------------
    47 áéíóú   áéíóú    ã¡ã©ã­ã³ãº
    
  • And i thinks it's not a PostgreSQL issue, because in psql i can do:
    legolasdb=# show client_encoding;
    NOTICE:  Current client encoding is UNICODE
    SHOW VARIABLE
    legolasdb=# insert into zzz_encoding (id, test)
    legolasdb-#     values (nextval('zzz_encoding_id_seq'), 'áéíóú');
    INSERT 184598 1
    legolasdb=# select id, test, upper(test), lower(test) from zzz_encoding;
    id |   test     |   upper    |   lower
    ---+------------+------------+------------
    48 | áéíóú      | ÁÉÍÓÚ      | áéíóú 
    
So the problem is:
  • The test string comes OK from the database.
  • upper(test) doesn't returns uppercase chars.
  • lower(test) returns garbage.
  • With psql, everything works fine.