This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Configuring gdb_wchar.h
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> 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 <tromey@redhat.com>
* 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}}},