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


Hi,

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/dir.cc. Inspection of this file leads onto fhandler.cc
and then the readdir implementation in fhandler_disk_file.cc. I would be
grateful for any assistance with the queries I have as a result of the
analysis.

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
FindNextFileW.

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:

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

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,
Shaddy


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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