X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-4.8 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SARE_SUB_PCT_LETTER
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4FD5F3D7.8060702@sister-shadow.de>
References: <CAKw7uVgEzeqw9=hRSiLtN-YkgWFhTPg-_VoTOowPUt0TXE2fyQ@mail.gmail.com>	<4FD5EB79.6060707@sister-shadow.de>	<CAKw7uViZd4X0az0Sqob4LDFBX6PfF4cU3DXmBwUG11-VncmGHg@mail.gmail.com>	<4FD5F3D7.8060702@sister-shadow.de>
Date: Mon, 11 Jun 2012 15:49:03 +0200
Message-ID: <CAKw7uVi08Bj0nO0165kxSh53Qvk699aHaN71WE1OgdTuyS5b8w@mail.gmail.com>
Subject: Re: s?wprintf family of functions has broken %s formatter output
From: =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 11 June 2012 15:34, Otto Meta wrote:
>> I have done some more checking and I might have been wrong about the
>
>> Ubuntu and Linux in general. It looks like the formatting strings are
>> incompatible between MSVC and *NIX. It appears that either %S (SUSv2)
>> or %ls (C99) is needed on *NIX. MSVC switches the meaning of %s for
>> wprintf() (http://linux.die.net/man/3/printf).
>
>
> Changing %s in your test program to %ls works for me on Ubuntu.
> Have you tried %ls in MSVC? That should work as well, according to
> http://msdn.microsoft.com/de-de/library/tcxf1dw6%28v=vs.80%29.aspx
Thank you for pointing this out. I guess I will use %ls and wchar_t
literals for compatibility. But still, this kind of stuff makes me
sad.

-- 
VZ

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

