marcelo Cortez <jmdc_marcelo@xxxxxxxxxxxx> writes: > testutf8=# \set > ... > ENCODING = 'UTF8' > HISTSIZE = '500' > testutf8=# select upper('ñ'); > ERROR: invalid UTF-8 byte sequence detected near byte > 0xf1 > testutf8=# You're telling the system that your client encoding is utf8, but it looks from here like you're using some LatinN encoding. Try "\encoding latin1" or whatever it is your keyboard is generating. regards, tom lane