From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <tromey@redhat.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFC-v2] Allow explicit 16 or 32 char in 'x /s'
Date: Thu, 01 Apr 2010 09:34:00 -0000 [thread overview]
Message-ID: <000f01cad17e$7686f140$6394d3c0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <83tyrwxy72.fsf@gnu.org>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> > +the unit size defaults to @samp{b}, unless it is explicitly given.
> > +Use @kbd{x /hs} to display 16-bit char strings and @kbd{x /ws} to
> display
> > +32-bit strings. The next use of @kbd{x /s} will again display 8-bit
> > strings.
>
> This is okay, but I still think we should mention that the encoding is
> UTF-16 and UCS-4, respectively, and that it cannot be changed.
According to c_emit_char function, it is
UTF-16 (LE or BE depending on target endianess)
or UTF-32 (LE or BE also).
Is UCS-4 exactly the same as UTF-32?
Furthermore, this is c_emit_char, which means that this
is a language specific output.
Several languages have their own emit_char functions,
several of them start by a
c &= 0xFF;
line, which discards higher bytes of the character value.
(found in f-lang.c:86, m2-lang.c:45, objc-lang.c:287 and p-lang.c:161)
Of course these implementations would benefit from
using the more up to date c-lang.c implementation, but that is another
story.
This means that UTF-16 and UTF-32 will only be used
for c, cplus, assembler, minimal.
Java language seems to use another scheme to represent
extended characters: it uses
fprintf_unfiltered (stream, "\\u%.4x", (unsigned int) c);
To summarize, I don't think that saying that ' /hs' uses UTF-16
without specifying that this is language specific is correct.
Should I just mention that the output is language dependent
and uses UTF-16 or UTF-32 for c, cplus, assembler and minimal languages?
Pierre Muller
next prev parent reply other threads:[~2010-04-01 9:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11484.4708740295$1268865815@news.gmane.org>
2010-03-18 22:08 ` [RFC] " Tom Tromey
2010-03-19 7:32 ` Eli Zaretskii
2010-03-22 22:54 ` Pierre Muller
[not found] ` <15103.6087111153$1269298497@news.gmane.org>
2010-03-30 20:33 ` Tom Tromey
2010-03-31 16:11 ` [RFC-v2] " Pierre Muller
[not found] ` <006101cad0ec$cb7915d0$626b4170$%muller@ics-cnrs.unistra.fr>
2010-03-31 16:17 ` Eli Zaretskii
2010-04-01 9:34 ` Pierre Muller [this message]
[not found] ` <000f01cad17e$7686f140$6394d3c0$%muller@ics-cnrs.unistra.fr>
2010-04-01 13:17 ` Eli Zaretskii
2010-04-05 23:01 ` Pierre Muller
[not found] ` <002701cad513$e44a7420$acdf5c60$%muller@ics-cnrs.unistra.fr>
2010-04-06 17:51 ` Eli Zaretskii
2010-04-08 20:58 ` [RFA-v3] " Pierre Muller
2010-04-16 8:41 ` [PING] " Pierre Muller
[not found] ` <48335.255837492$1271407316@news.gmane.org>
2010-04-21 22:49 ` Tom Tromey
2010-04-21 23:22 ` Pierre Muller
2010-06-11 17:38 ` Ulrich Weigand
2010-07-02 19:09 ` Tom Tromey
2010-07-05 10:17 ` Ulrich Weigand
2010-07-20 20:13 ` [patch] testsuite: regression on failed charset.exp compilation [Re: [RFA-v3] Allow explicit 16 or 32 char in 'x /s'] Jan Kratochvil
2010-07-20 22:00 ` Tom Tromey
2010-07-20 22:13 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000f01cad17e$7686f140$6394d3c0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).