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:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=vVp6ftKtMBC9T+sX 4gxisqk4DwrLPFL1SesesDGOj6GhVY7Wskc8Ewap0inAqGMQ0p5WrCTwOJq94anp qmtPzo6sIpnU8lOxx5zPzhAoxn1C7+vFyslU8RANSo7NPrwcWEYjaU6+gjI/t45t 5JI+wh0wxZrSpSgrkoWOWeA/hLc= 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:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=ydDnunGXk7EufUMFcTJPsi IU4rU=; b=YVoSoqCTBGPf5/7nrW0zAdLt+TSOm9ls054JOYYHq9xNvljEgsPT27 dxp8CQ2MF6pzH38I0A253QDikML/6xUjL7wCK2rhUpHv8S87hfTmchmR5hmVyWDX jtBxSgg9ehgbOze2No27w8qmz7sK1PtDb+BntmhXgtYUaZiekUs3Q= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_50,BODY_8BITS,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,GARBLED_BODY,KAM_INFOUSME,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Sun, 16 Feb 2014 17:52:02 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1184152333.20140216175202@yandex.ru> To: Corinna Vinschen Subject: Re: New passwd/group handling in Cygwin - test results and observations In-Reply-To: <20140214140532.GD2246@calimero.vinschen.de> References: <20140213143849 DOT GH2246 AT calimero DOT vinschen DOT de> <1717869165 DOT 20140214021113 AT mtu-net DOT ru> <20140214102044 DOT GX2246 AT calimero DOT vinschen DOT de> <1078913914 DOT 20140214155631 AT mtu-net DOT ru> <20140214140532 DOT GD2246 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id s1GDsZDK022542 Greetings, Corinna Vinschen! >> > But this is a problem not different from Linux. If you have a username >> > with non-ASCII chars, it will use *some* encoding in the passwd DB, >> > usually UTF-8 these days. If you then change the codeset in your >> > application, you will still get your username in UTF-8. It won't be >> > changed on the fly, just because your application calls setlocale. >> >> I understand it (mostly), but there's actually two issues, not one. >> One issue is the display part, where names are output for user consumption. >> Another can be observed in, i.e., rsync, and file access in general (remember >> the discussion about accessing long directory names in unicode). >> Changing LANG variable DO matter for the latter, and you may only hope that >> whatever is output in the former case is actually printable (thank God, most >> of the time it actually is, in case of UTF-8). >> It is getting even more complicated, when you consider the fact, that in >> Windows you have 2 different single-byte encodings, so-called ANSI (for GUI >> applications) and OEM (for console). And alot of stuff making assumptions >> without consulting with current status of things. >> As convoluted the problem is, I think, we need some sort of solution, or at >> the very least - documentation. > Sorry, I can't provide an easy solution, and afaik this is documented. I don't know, how it did not hit my head earlier, but now that I think about it... The fact `ls' does not print correct group names, but correctly translate dates... eww, wait. There's something bad happens under the hood. Please check this image: http://img513.imageshack.us/img513/43/jn7n.png LANG is set (pre-set, before Cygwin tree start) to ru_RU.UTF-8 for mintty and ru_RU.CP866 for console. As you can see, existing group (i.e. - "Administrators") is properly translated to chosen locale, which is not the case for group "Отсутствует". The SID of the group "DAEMON2\Отсутствует" is S-1-5-21-1801674531-1644491937-1606980848-513 Cygwin show it as -rwxr-xr-x 1 197612 197121 45597 мар 22 2013 xargs.exe which matching your description for "Accounts from the local machine's user DB (SAM)" (0x30000+513 =197121) (and yes, the leading part of the SID is matching the one of the other users on this system), but the group is missing from `wmic GROUP LIST' output. I presume, it was deleted at one point, or it is remnants of the previous OS installation, transferred over with the disk to this system. Either case explains the name of the group - "Missing" or "Nonexistent". Means, it's name does not exist in current SAM database. -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 14.02.2014, <21:19> Sorry for my terrible english...