[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debconf and locale specific characters

Hi Torsten,

On Tue, Apr 05, 2005 at 09:20:33AM +0200, Torsten Landschoff wrote:
> My OpenLDAP 2.2 packages have a problem if the user enters something
> using his locale specific character (like äöü) into the organization
> field which is queried using debconf cf. http://bugs.debian.org/236097

> The LDIF RFC demands that character data is either in 7 bit ASCII or
> in UTF-8 (and base64 encoded, uargh). No I wonder how to convert the
> data that I get from debconf to UTF-8. 

> It is save to assume that the data from debconf is in the charset of the
> current locale? Then foo=`echo $RET|iconv -t UTF8` after the db_get
> would suffice. Of course the locale could change between config and
> postinst so maybe I should convert to UTF-8 and store the result in the
> debconf db in the config script?

The one thing I would worry about is checking the encoding of data entered
using the GNOME frontend, which may have different behavior than the text
frontends.  For the text frontends, I certainly think it's safe to assume
that the input data arrives in the locale charset.

I agree there's a (slim) chance of the charset changing between config and
postinst, so recoding in the config script itself is best.

Steve Langasek
postmodern programmer

Attachment: signature.asc
Description: Digital signature

Reply to: