delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/11/09:34:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SARE_SUB_PCT_LETTER
X-Spam-Check-By: sourceware.org
Message-ID: <4FD5F3D7.8060702@sister-shadow.de>
Date: Mon, 11 Jun 2012 15:34:15 +0200
From: Otto Meta <otto DOT meta AT sister-shadow DOT de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: s?wprintf family of functions has broken %s formatter output
References: <CAKw7uVgEzeqw9=hRSiLtN-YkgWFhTPg-_VoTOowPUt0TXE2fyQ AT mail DOT gmail DOT com> <4FD5EB79 DOT 6060707 AT sister-shadow DOT de> <CAKw7uViZd4X0az0Sqob4LDFBX6PfF4cU3DXmBwUG11-VncmGHg AT mail DOT gmail DOT com>
In-Reply-To: <CAKw7uViZd4X0az0Sqob4LDFBX6PfF4cU3DXmBwUG11-VncmGHg@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

> 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

Otto

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

- Raw text -


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