This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: generating /etc/passwd and /etc/group for domians with users with cyrillic names


Hi!

Wednesday, 11 April, 2001 Christopher Faylor cgf@redhat.com wrote:

CF> On Wed, Apr 11, 2001 at 09:58:27AM +0900, Kazuhiro Fujieda wrote:
>> Corinna Vinschen <cygwin-patches@cygwin.com> said:
>>> Why is that needed? What is the problem with the original functions?
>>
>>The `wcstombs' included in newlib simply strips the higher byte
>>of Unicode. It can't translate Cyrillic, Greek, Turkish, and so on
>>from Unicode to their ANSI codepages. WideCharToMultiByte can do
>>these translations well.

CF> Would it make sense to augment newlib to do the right thing, then?

it's possible, but, as Kazuhiro's already said, such translation
should depend of current locale, so we can't use native functions --
they're using current win32 codepage which can be unrelated to unix
locale. so, i suppose, newlib will need to use some translation table
from /usr/share/locale/*  Alas, i don't feel i'm good enough in
unix-style i18n to volunteer for the job.

Using native i18n methods is a bit kludgy, but i think it's ok for
windows-specific utility. i've checked the patch in.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]