"John D. Burger" <john@xxxxxxxxx> writes: >> My queries are utf-8 an the database is SQL_ASCII. > I suspect the bracketed expression is turning into [aXY], where XY is > the two-byte sequence corresponding to ã in UTF8. That's what it looks like to me. You can hardly blame the database for this, when you haven't clued it in that you're using UTF8. > I don't know if a UTF8 database will handle this correctly or not. I believe that it will work in recent PG releases (7.4 and up). regards, tom lane