From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81160 invoked by alias); 7 Jan 2016 12:48:02 -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 80938 invoked by uid 89); 7 Jan 2016 12:48:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-102.3 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=corinna, Vinschen, vinschen, Maintainer X-HELO: calimero.vinschen.de Received: from ipbcc02fe8.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.47.232) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Jan 2016 12:47:58 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id B653DA80460; Thu, 7 Jan 2016 13:47:56 +0100 (CET) Date: Thu, 07 Jan 2016 12:48:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: stat() lstat() not able to read long filename with cyrillic chars? Message-ID: <20160107124756.GB20447@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20151223194440.5B2A98CFEA@edrusb.is-a-geek.org> <20151224192448.GB4275@calimero.vinschen.de> <773876572.20151225030451@yandex.ru> <20151226215732.3196F8B96F@edrusb.is-a-geek.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline In-Reply-To: <20151226215732.3196F8B96F@edrusb.is-a-geek.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-01/txt/msg00058.txt.bz2 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1191 On Dec 26 22:57, Denis Corbin wrote: > On 25/12/2015 01:04, Andrey Repin wrote: > > Greetings, Corinna Vinschen! > >=20 > >>> First, I have read the FAQ and this mailing archive :) > >>>=20 > [..] > >=20 > >> NAME_MAX is 255. On Windows this is the number of UTF-16 chars=20 > >> unfortunately. On POSIX systems (as on Cygwin) this is the=20 > >> number of bytes. Long UTF-16 strings in cyrillic take twice as=20 > >> much UTF-8 chars as it has UTF-16 chars, so NAME_MAX in utf-8=20 > >> cyrillics translates into a maximum of 127 UTF-16 chars. >=20 > Ok, I understand. Thanks for your explanation. >=20 > >=20 > > Aren't POSIX restrictions are a bit different? Namely 128 bytes > > per path element and 4096 bytes for file name? >=20 > Seen the sample file name it seems truncated rather near 256 bytes (~ > 128 UTF-16 chars) than 4096 bytes... NAME_MAX/_POSIX_NAME_MAX are 255, PATH_MAX/_POSIX_PATH_MAX are 4096. NAME_MAX defines the maximum length of a path component, PATH_MAX the maximum length of an entire path. In bytes. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWjl58AAoJEPU2Bp2uRE+g4gkP/RLFxMokOnTwYWNny8F3mzOA 4tjgXygx9ollpeazQ/MgnMuWXBPVLvUYOYhRUqfiBpFyQMqr1pNHmFDBcFQYmVYO AQRTgrKdza4e3YKM/H18jiYmyiSPEM2WloXBlK0sWT5aLGBiWlZVYTL6AcZeGktL 51uXEd1jamK38SmqBZEoPTCDFmIJ97Y86pHqCgyvrDPcPjD1xSg1SH4KJMTYVzfs LCogEPo6mrkbOwoxa1wGM/F1+FLg/GZWMBmVioUDFKSo0go+mPeoIIBJ8U8XmigM 7XUA/cC3LswnD/ZBOZ8fMcuaJVvzOdm4O3AkvvKWYxP2L2qJJCiYO+hjdmpHe155 4nHe2YgeooHeEZTMjy5CU9eL6fbZujzGTExsm44rfqgme60ZKsmtMXP2vgHxkl1Q 8Tv5cIhdlVNccIAq0okSSNWFe7R+BHZBEdcXb1xH0b8hiKo+uqWjsos3wm4U4Af3 u0mXMOk8D1I091iDVfpCtJoeou4vhUQqPPxinzUbH91fr/iKol0+DsAvb/3L0UH8 hUZ5JMIVvRdB5JQVYiIQcUdvDJrtFiVq5peh7azEQxKmUIM0lPQhWdn2fT6UU5yh 8FoOctG4RwNE05Vi1TdJTgU1T+4YQ+mfU+4ySI8KAcLg7jMdhh4KiAviaARR7BQe xXwhPr+wPXgSyvhJz/vO =rcPo -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r--