-----------------------------7d3317211031e
Content-Disposition: form-data; name="message"

wcLoarbo
-----------------------------7d3317211031e
Content-Disposition: form-data; name="re_msg"

10515320110000063268
-----------------------------7d3317211031e
Content-Disposition: form-data; name="plainmode"

0
-----------------------------7d3317211031e
Content-Disposition: form-data; name="test"

ТЕСТ
-----------------------------7d3317211031e
Content-Disposition: form-data; name="To"

Pablo Saratxaga <[EMAIL PROTECTED]>
-----------------------------7d3317211031e
Content-Disposition: form-data; name="CC"

[EMAIL PROTECTED], Frederic Lepied <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
-----------------------------7d33172
any progress for this? the last change to initscripts only broek l10n
completely ...

-----Original Message-----

> Kaixo!
> 
> On Sun, Apr 27, 2003 at 09:30:54PM +0400, Andrey Borzenkov wrote:
> 
> > Obviously new gettext needs valid locale.
> 
> Not only. there is also gconv involved.
> 
> > The problem is more serious. gettext needs *valid* locale. Because /usr may 
> > not be mounted it means, installer must copy into /etc/locale the real 
> > default locale (as set in /etc/system/i18n)
> 
> it seems that is already the case ? (don't you have the LC_* files
> in /etc/locale/xx/ ? )
> 
> After doing strings libc | grep PATH I see there are two interesting
> shell variables: LOCPATH and GCONV_PATH
> LOCPATH defines the place where locale data files are stored (it defaults
> to /usr/share/locale); so, the thing to do, would be, if /usr is on
> a different partition, use LOCPATH=/etc/locale in initscripts, until
> the /usr partition gets mounted (or, more exactly, until /usr/share/locale
> gets available).
> 
> After looking on /etc/rc.d/init.d/functions, I see LOCPATH is defined too...
> 
> 
> There is also the need of gconv modules to convert the strings from the
> encoding used in the initscripts.mo file, into the encoding used
> by the locale.
> In order to reduce the gconv modules, we can make a policy to use exclusively
> UTF-8 as the encoding for initscripts.po files.
> So, what would be needed would be:
> - to have an /etc/locale/gconv directory
> - copy there the *.so file corresponding to the charset encoding of the
>   locale
> - put into /etc/locale/gconv/gconv-modules the lines corresponding to
>   that so file (eg, if KOI8-R.so is copied there, then the following lines
>   have to be copied:
> 
> alias   CSKOI8R//               KOI8-R//
> alias   KOI8R//                 KOI8-R//
> module  KOI8-R//                INTERNAL                KOI8-R          1
> module  INTERNAL                KOI8-R//                KOI8-R          1
>  
> the 3d parameter of the lines "module" is the filename (minus the '.so')
> and the names other than "INTERNAL" shown in the right "module" name should
> be used as a grep to see which alias lines to copy too.
> the identifier and file name don't always match; eg:
> 
> alias   LATIN1//                ISO-8859-1//
> ...
> module  INTERNAL                ISO-8859-1//            ISO8859-1       1
> 
> identifier "ISO-8859-1//" but filename "ISO8859-1.so" 
> 
> 
> > messages. E.g. in my case installer set locale to ru_RU.UTF-8; if my /usr 
> > were on separate filesystem it would not work even with above patch because 
> > /etc/locale/ru_RU.UTF-8 did not exist so LANG would refer to invalid locale.
> 
> Mmm, indeed.
> 
> So, it is needed (if /usr is on a different poartition; if /usr is on
> same partition as / it isn't needed at all) to:
> 
> - copy to /etc/locale/ the directory(ies) with all the LC_* files of the
>   locale values used for the LC_* variables in /etc/syscoinfig/i18n
>   (there may be one or two values (in case xx_YY doesn't exit, there is
>   xx_CC and ll_YY))
> - create a (several) /etc/locale/xx/LC_MESSAGES/ for the language(s)
>   listed in LANGUAGE varaible for which there is an initscripts.mo file
>   and copy the initscripts.mo there
>   (eg, if LANGUAGE=pt_BR:pt and there is
>   /usr/share/locale/pt/LC_MESSAGES/initscrtipts.mo and ..../pt_BR/....mo 
>   then copy them to /etc/locale/pt/LC_MESSAGES/initscripts.mo and 
>   /etc/locale/pt_BR/LC_MESSAGES/initscripts.mo
> - create a directory /etc/locale/gconv and copy there the *.so file for
>   the charset of the locale (the one given by "locale charmap" (it depends
>   on the locale linked to the language, as it depends on LC_CTYPE)
>   and put into the file /etc/locale/gconv/gconv-modules the proper lines
>   taken out of /usr/lib/gconv/gconv-modules
> - define in init scripts LOCPATH=/etc/locale (for finding the LC_* files),
>   TEXTDOMAINDIR=/etc/locale (for gettext finding the *.mo files),
>   and GCONV_PATH=/etc/locale/gconv (for gconv finding the proper module
>   to convert charsets).
> 
> If the locale charset is the same as the one used in the mo file, gconv
> is not needed (that explains why Red Hat don't care about it: they use UTF-8
> everywhere...).
> TEXTDOMAINDIR and LOCPATH were defined; what was missing was:
> - copy of proper LC_* files (it seems some LC_* files were copied, but
>   corresponding to the language name, not the locale name)
> - gconv support
> 
> Forcing all initscripts.mo files to be in utf-8 makes things simpler
> as UTF-8 is known internally by gconv, so only the conversion to the
> locale encoding is needed; otherwise, there may be several modules
> involved (for example, for French the locale may be in iso-8859-15 but
> the po file in iso-8859-1; or for russian, the po file may be in koi8-r,
> or koi8-u, or cp1251, or even iso-8859-5) 
>  
> > Pablo, please see if initscripts need more fixes or if this patch is enough 
> > (it did the trick for me). As for installer it has to be fixed (pixel?). It 
> > also means that changing locale on the fly after installation becomes 
> > increasingly more difficult.
> 
> Not necessarly; as the same code is shared in DrakX and localedrake;
> we can do a simple "rm -rf /etc/locale" and recopying all the needed files
> each time the default locale is changed by root.
> 
> The complexity is on the selection of which files to copy there; but
> doing it at install time or when changing the locale doesn't change anything
> regarding the complexity of the task.
> 
> > 
> > -andrey
> > 
> 
> Thanks for reporting the problem.
> 
> -- 
> Ki Гa vos vЕye bИn,
> Pablo Saratxaga
> 
> http://chanae.walon.org/pablo/                PGP Key available, key ID: 0xD9B85466
> [you can write me in Walloon, Spanish, French, English, Italian or Portuguese]
> 
> ATTACHMENT: application/pgp-signature
> 

Reply via email to