dbTalk Databases Forums  

The dreaded invalid multibyte character for locale

comp.databases.postgresql comp.databases.postgresql


Discuss The dreaded invalid multibyte character for locale in the comp.databases.postgresql forum.



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

Default The dreaded invalid multibyte character for locale - 01-18-2007 , 05:14 PM






Hello,

I'm a novice using postgresql and I've hit the

ERROR: invalid multibyte character for locale

error when using the lower function. I've seen several messages in the web
citing clashes of locales and encodings as the reason for this. Now, I
can't see any of these incompatibilities in my settings so I'm lost at what
to try. My database reports:

db=> select version();
version
------------------------------------------------------------------------------------------------------------
PostgreSQL 8.0.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.0.gcc-opt
(GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu1)
(1 fila)

db=> show lc_ctype;
lc_ctype
-------------
es_ES.UTF-8
(1 fila)

db=> show client_encoding;
client_encoding
-----------------
UNICODE
(1 fila)

In the shell:
$ locale
LANG=es_ES.UTF-8
LANGUAGE=es_ES:es:en_GB:en
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

and the database is certainly UNICODE.

As you can see, the machine is configured for the spanish locale.

Thanks for any suggestions.

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: The dreaded invalid multibyte character for locale - 02-14-2007 , 05:07 AM






Jano <devnull (AT) mailinator (DOT) com> wrote:
Quote:
I'm a novice using postgresql and I've hit the

ERROR: invalid multibyte character for locale

error when using the lower function.
What is the exact statememt that provokes this error?

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Jano
 
Posts: n/a

Default Re: The dreaded invalid multibyte character for locale - 02-14-2007 , 02:38 PM



Laurenz Albe wrote:

Quote:
Jano <devnull (AT) mailinator (DOT) com> wrote:
I'm a novice using postgresql and I've hit the

ERROR: invalid multibyte character for locale

error when using the lower function.

What is the exact statememt that provokes this error?
I finally tracked it down to invalid data in some records. I read somewhere
that in past versions you could insert invalid data and just get a warning,
whereas attempting to use 'lower' or similar would give an error.

I dumped the database, upgraded to 8.1 and on import I got hit by errors in
the bad records, which I corrected.

So all in all it wasn't at any point a configuration problem...

Thanks for your interest,


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.