From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39137 invoked by alias); 23 Dec 2015 19:44:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 39120 invoked by uid 89); 23 Dec 2015 19:44:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?Yes, score=6.8 required=5.0 tests=AWL,BAYES_50,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=8:=d0=b0, 8:=d0=b2, Latin, 8:=d0=b1?= X-HELO: edrusb.is-a-geek.org Received: from edrusb.is-a-geek.org (HELO edrusb.is-a-geek.org) (82.231.235.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Dec 2015 19:44:43 +0000 Date: Wed, 23 Dec 2015 19:44:00 -0000 From: Denis Corbin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130119 Icedove/10.0.12 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: stat() lstat() not able to read long filename with cyrillic chars? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20151223194440.5B2A98CFEA@edrusb.is-a-geek.org> X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00296.txt.bz2 Hi, First, I have read the FAQ and this mailing archive :) Here is the problem I meet: In a directory are placed three files using windows 8's explorer: - a short Cyrillic filename "абваб.txt" - a long Cyrillic filename "абвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабвабваб.txt" - a long Latin filename "ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa.txt" >From a C program compiled under Cygwin, I can obtain the corresponding filename strings using readdir_r()... "\320\260\320\261\320\262\320\260\320\261.txt" "\320\260\320\261\320\262\320\260\320\261\320\262\320\260\320\261 [snipped]" "abababababaababababa [snipped]" ... but passing these strings in turn to lstat() or stat() returns 0 as expected for all except for the long Cyrillic filename. For for this string a get a negative value from lstat() and stat() and errno is set to ENOENT (while the entry is still present). using "ls" instead of my own program gives something similar: the long Cyrillic filename is listed but no permission, username, groupname or data are displayed, these are replaced by question marks. Is there something special to do and that I missed in order to read long Cyrillic filenames from a C program under Cygwin? Thanks for any help, Regards, Denis. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple