[imp] Signature in UTF-8 [solved]

Jan Schneider jan at horde.org
Thu Feb 7 15:43:54 UTC 2008


Zitat von "Daniel A. Ramaley" <daniel.ramaley at DRAKE.EDU>:

> On Thursday 07 February 2008 08:33, Micha Kersloot wrote:
>>>>> Seems that UTF-8 is working allright in Imp3, but i'm not able to
>>>>> use these characters in the signature.
>>> Sorry my mistake... It is Imp H3 4.1.5 that i am using.
>>
>> With help of Jan, i've found out that you also need to set the
>> database connection to UTF8 in the horde configuration.
>
> Being a university we have people from many countries using our
> Horde/Imp installation. Though i've not yet heard any complaints, it
> would be good to make the same switch here. What all is involved in
> switching the database encoding?
>
> I'm using PostgreSQL 7.4.19. According to psql the horde database is
> using "SQL_ASCII" encoding. Horde's database connection is configured
> to use "iso-8859-1".
>
> If i wanted to upgrade to UTF-8, it would not be as simple as telling
> Horde to start using "utf-8", would it? I would also have to convert
> the database itself, right?

Correct.

> If the database itself needs to be re-encoded, my thought is to first
> dump the database and edit the "CREATE DATABASE" line to use
> encoding "UNICODE". Then drop the existing horde database, load the
> modified dump in its place, and reconfigure Horde to use utf-8.

These seems to be PostgresQL specific feature, so I can't tell what  
exactly it does, but it sounds reasonable.

> Is any conversion of the dump file itself beyond changing the CREATE
> DATABASE encoding necessary? Right now if i perform a dump, the "file"
> utility reports the result as ASCII text. Plain ASCII shouldn't need
> conversion in order to also be valid UTF-8, right?

If you are absolutely sure that you only have ASCII data, this is  
sufficient. But as soon as you have latin1 aka iso-8859-1 characters  
above 127 inside your data, this no longer works, because those  
characters are multibyte in utf-8. And this breaks at least in those  
cases where we store serialized arrays.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the imp mailing list