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

Re: debconf w/ charset encoding support



On 18 09 2002 04:21, Junichi Uekawa wrote:

> There is a list posted in the bug entry, to assume the original unspecified
> encoding, by Tomohiro Kubota.
> Please use it.

> ----------------------------------from here
> #!/usr/bin/perl
>
> use Text::Iconv;
>
> # Convert encoding of translated Debconf message (Description-* and so on)
> # from commonly-used encoding for each language (for example, EUC-JP for
> # Japanese) to the encoding specified by the current LC_CTYPE locale.
> #
> # $newtext = ToLocaleEncoding($text, $lang);
> #
> # $text     translated Debconf message
> # $lang     language name in xx_YY or xx format
> # $newtext  converted Debconf message which can directly be output
> #           to the stream
> #
> # Note:
> #   1. This function depends libtext-iconv-perl package.
> #   2. The list of commonly-used encodings for Debconf templates
> #      is tentative.
> #   3. Encodings for Debconf templates may be changed (to, for
> #      example, UTF-8) in future.  Even in such a case, this function
> #      will be useful when using debconf in non-UTF-8 locales.
>
> sub ToLocaleEncoding ($$) {
>     my ($localeencoding, $text, $lang, $conv, $result, $from, %template);
>     %template = (
> 	# language name => encoding used for debconf template

please add:

"bg"  => "CP1251"

> 	"cs"    => "ISO-8859-2",
> 	"da"    => "ISO-8859-1",
> 	"de"    => "ISO-8859-1",

CP1251 is suitable for bulgarian alphabet and is the common encoding used in 
bulgarian unix world. Thanks for adding us ;-)
-- 
Greets, fr33zb1 
[catching up with Sid (the boy next door who destroyed toys :-)]



Reply to: