From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28244 invoked by alias); 15 Apr 2009 18:04:38 -0000 Received: (qmail 27917 invoked by uid 22791); 15 Apr 2009 18:04:35 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Apr 2009 18:04:26 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n3FI3xTg005348 for ; Wed, 15 Apr 2009 14:04:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3FI3xVQ000642 for ; Wed, 15 Apr 2009 14:03:59 -0400 Received: from opsy.redhat.com (vpn-12-183.rdu.redhat.com [10.11.12.183]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3FI3wO5020286; Wed, 15 Apr 2009 14:03:58 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EE62B50830B; Wed, 15 Apr 2009 12:03:57 -0600 (MDT) To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: Configuring gdb_wchar.h References: <8363hboz5x.fsf@gnu.org> <833acbo32k.fsf@gnu.org> <83myajma7a.fsf@gnu.org> <83iql7m7r1.fsf@gnu.org> <83hc0rm1mh.fsf@gnu.org> <8363h6mdue.fsf@gnu.org> <833acam2wl.fsf@gnu.org> <83zleikk46.fsf@gnu.org> From: Tom Tromey Reply-To: Tom Tromey Date: Wed, 15 Apr 2009 18:04:00 -0000 In-Reply-To: <83zleikk46.fsf@gnu.org> (Eli Zaretskii's message of "Wed\, 15 Apr 2009 18\:32\:57 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-04/txt/msg00333.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: Tom> If a system has nl_langinfo(CODESET), then that is used. Tom> Otherwise, we fall back on a built-in default. Eli> Would it make sense to tailor the default on specific platforms? Eli> DJGPP does not have `nl_langinfo', and will probably never support any Eli> character set except ASCII and the current DOS codepage. Yeah, it would make sense to be able to auto-select the host charset. If there is a way to detect the current DOS codepage, and if that is equivalent to the notion of the host charset (I don't know), then we could put the needed code into _initialize_charset. Eli> GDB 6.8 shows ISO-8859-1 for both character sets, FWIW. Tom> 6.8 did no auto-detection at all and had ISO-8859-1 coded in. Tom> I changed the default to UTF-8 because that is increasingly common. Eli> We need to document all that, I think. I will give it a shot if no Eli> one beats me to it. How about the appended? Tom 2009-04-15 Tom Tromey * gdb.texinfo (Character Sets): Document default character set. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5269dfc..ebba32f 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -7998,7 +7998,9 @@ Set the current host character set to @var{charset}. By default, @value{GDBN} uses a host character set appropriate to the system it is running on; you can override that default using the -@code{set host-charset} command. +@code{set host-charset} command. On some systems, @value{GDBN} cannot +automatically determine the appropriate host character set. In this +case, @value{GDBN} uses @samp{UTF-8}. @value{GDBN} can only use certain character sets as its host character set. If you type @kbd{@w{set target-charset @key{TAB}@key{TAB}}},