www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/27/10:10:24

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-AuditID: 8b79118b-a5daeba000005482-97-48b5600f0118
Message-Id: <48B5600D.2000608@saic.com>
Date: Wed, 27 Aug 2008 10:09:17 -0400
From: Roger Wells <ROGER DOT K DOT WELLS AT saic DOT com>
Reply-To: "WELLS, ROGER K." <ROGER DOT K DOT WELLS AT saic DOT com>
User-Agent: Thunderbird 2.0.0.16 (X11/20080707)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: printf: %ls or %S does not work when string is of length 1.
References: <e27efe130808270654p515fce76y8356edbfec8b7830 AT mail DOT gmail DOT com>
In-Reply-To: <e27efe130808270654p515fce76y8356edbfec8b7830@mail.gmail.com>
X-IsSubscribed: yes
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

Amaury Forgeot d'Arc wrote:
> Hello,
> it seems that cygwin does not correctly handle the %ls format when the
> given string
> has only one character.
>
> The following program should print
>     Test 1 (T)
> and that's what it does on Linux 64bit and Windows, when compiled with VS8.0
>   
The output is also correct on Windows when built with MinGW gcc v3.4.5
roger wells


> But cygwin's output is
>     Test 1
>
> I've seen this only for 1-wchar strings.
> This is will be a problem with the upcoming python 3.0 interpreter, as
> reported here:
> http://bugs.python.org/issue3626
>
> Is there a problem with cygwin's implementation, or did I miss
> something obvious?
>
>
> /* ======================================== */
> #include <stdio.h>
> int main()
> {
>   wchar_t text[] = L"T";
>   printf("Test %d (%ls)\n", wcslen(text), text);
> }
> /* ======================================== */
>
>
> --
> Amaury Forgeot d'Arc
>
> --
> 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/
>
>
>   

-- 
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger DOT k DOT wells AT saic DOT com


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

- Raw text -


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