delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/01/07/07:48:25

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=xOsOQs45RuNahmNlVL+ZLanwFF6OT8RoHBr1iIJ68h6HvPe/FhmRl
6cQ/O2NGjCHkxEURlAAyiGeBRJ1V8efvCQCAGJKRtHF7RXcMVFtDw8/Mm3wGGvOu
Rlsz4LvoDw5X68oWZiV1mt2nGFmo/RRVJsxsgOVQtktooVPd+3RiwU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=SRAaVV0vjMadLz/M7SwcXe9wQW0=; b=MYPL6yepUSoaozbn6BGIeKxxO02X
9vxsT+IZbCNetmhfUvh9PASnJTDfmJsLvogSonnVV+XSDMgeJrjDVn6hqTpHaeWD
/OvjHEXdqORFNAWg0t3r+7dSo1B3mrGXAd9ZfyEnUUSaEv51ltfATKIZiiDnG1cb
A3irM9uPzEJ+wfg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Thu, 7 Jan 2016 13:47:56 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: stat() lstat() not able to read long filename with cyrillic chars?
Message-ID: <20160107124756.GB20447@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20151223194440 DOT 5B2A98CFEA AT edrusb DOT is-a-geek DOT org> <20151224192448 DOT GB4275 AT calimero DOT vinschen DOT de> <773876572 DOT 20151225030451 AT yandex DOT ru> <20151226215732 DOT 3196F8B96F AT edrusb DOT is-a-geek DOT org>
MIME-Version: 1.0
In-Reply-To: <20151226215732.3196F8B96F@edrusb.is-a-geek.org>
User-Agent: Mutt/1.5.24 (2015-08-30)

--2B/JsCI69OhZNC5r
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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"

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019