From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3934 invoked by alias); 18 Apr 2011 20:07:27 -0000 Received: (qmail 3859 invoked by uid 22791); 18 Apr 2011 20:07:05 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 18 Apr 2011 20:06:48 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 2F7CF2C009E; Mon, 18 Apr 2011 22:06:43 +0200 (CEST) Date: Mon, 18 Apr 2011 20:07:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] Handle cygwin wchar_t specifics Message-ID: <20110418200643.GK25815@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <5928.31498147479$1302882967@news.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00287.txt.bz2 Hi Tom, On Apr 15 12:15, Tom Tromey wrote: > >>>>> "Pierre" == Pierre Muller writes: > > Pierre> because of this, GDB uses "UCS-4LE" > Pierre> for the macro INTERMEDIATE_ENCODING on Cygwin > Pierre> (while "wchar_t" it uses for mingw32, which works well). > > Ok, I see the problem. I thought this: > > /* If __STDC_ISO_10646__ is defined, then the host wchar_t is UCS-4. > > But this is not true! For some values of __STDC_ISO_10646__, a 2 byte > wide character type suffices. In particular, Cygwin's value of 200305 > means that it corresponds to Unicode 4.0.0: > > http://www.unicode.org/versions/components-4.0.0.html > > I think this might be a Cygwin bug, but it is pretty hard to wade > through the ISO / Unicode differences and other assorted standardese to > see. (The reason I think it might be a bug is that Unicode 4.0.0 > defines some characters > 0xFFFF.) I see there's another solution in the works, but just to let you know that Bruno Haible and I discussed the definition of __STDC_ISO_10646__ on the Cygwin list back in January. We didn't come to a conclusion since we both interpret the standards differently, but this gives you some insight why __STDC_ISO_10646__ is defined on Cygwin, see http://cygwin.com/ml/cygwin/2011-01/msg00410.html, line 70ff. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat