This is the mail archive of the cygwin 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]
Other format: [Raw text]

i18n: readdir API implementation


I've known for sometime that there are limitations to the the
internationalization support provided by the cygwin dll. Specifically,
the POSIX readdir implementation returns dirent names where non US-ASCII
characters default to ASCII '?' character. I am sympathetic to the
difficulties involved with implementing a more generic handling of non
US-ASCII filenames.

However, in hope that there is something that can be done, I've looked
into the cygwin dll code that implements readdir, namely
src/winsup/cygwin/ Inspection of this file leads onto
and then the readdir implementation in I would be
grateful for any assistance with the queries I have as a result of the

Primarily, I am interested in the rationale behind using the ASCII
variants of the w32api system calls, FindFirstFileA and FindNextFileA,
as opposed to using the wide-character variants FindFirstFileW and

The latter system calls would suggest better internationalization
support, although, admittedly, there would be overhead calls (and code)
to handle the conversion of the wide characters to either a configurable
code page, or say UTF-8 as the fixed candidate.

Is this overhead the reason for not using the wide-character variants?

I also notice in the FindFirstFile/FindNextFile descriptions Windows API
documentation on MSDN, that it is stated:

Note that Unicode support on Windows Me/98/95 requires Microsoft Layer
for Unicode.

Is this the reason?

Any type of rationale would be very helpful, perhaps averting me from
wasting my time on a patch that is not likely to be useful (although I
have already pretty much determined what could be done, even if it just
a personal patch).

Thanks in advance,

Unsubscribe info:
Problem reports:

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