[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problems with accentuated characters

On Thu, Jul 17, 2003 at 09:23:22AM -0500, Jon Roberts wrote:
> Andreas wrote:
> > On Thu, Jul 17, 2003 at 03:10:52PM +0200, Bruno Biedermann wrote:
> >>I'm from France and i've got to migrate users from /etc/passwd. The 
> >>gecos field is filled with the person's real name (i.e : Gabriel 
> >>Péri)... The migrate_passwd works well and outputs a ldif file.
> >>When I try to ldapadd this ldif file I've got an error telling me that 
> >>there are invalid characters (é).
> > 
> >>I tried to encode the gecos field in mime64 to add it as binary data 
> >>into openldap but i've got this error now :
> > 
> > No, you have to convert it to UTF-8, then base64, and then use the
> > openldap tools to add it (slapadd or ldapadd).
> Actually, I've added LDIFs with UTF-8 encoded without encoding anything 
> to base64. An example LDIF is at:

In general you should never store base64 in the database, base64 is
only used in LDIF. Strings should be in UTF-8 (a plain ascii string
is already UTF-8). But, the problem is I guess that you're using the
posixAccount schema for storing data from /etc/passwd, and the schema
unfortunately requires the gecos data to be ascii only. Hence you must
either change your gecos data (no accented characters), or you must
use another schema.