Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <427CAB04.9040704@msa.hinet.net> Date: Sat, 07 May 2005 19:48:20 +0800 From: Shaddy Baddah User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: i18n: readdir API implementation Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 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, 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/