All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Bandan Das <bsd@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] vl: set LC_CTYPE early in main() for all code
Date: Mon, 15 Apr 2019 16:51:25 +0100	[thread overview]
Message-ID: <20190415155125.GN5718@redhat.com> (raw)
In-Reply-To: <0ade556d-bdf1-4440-472a-1e3e6cb7387a@redhat.com>

On Mon, Apr 15, 2019 at 10:25:03AM -0500, Eric Blake wrote:
> On 4/15/19 9:25 AM, Peter Maydell wrote:
> > On Mon, 15 Apr 2019 at 15:17, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >>
> 
> > A few typo nits below...
> 
> Also:
> 
> > 
> >>
> >> +    /*
> >> +     * Ideally we would set LC_ALL, but QEMU currently isn't able to cope
> >> +     * with arbitrary localization settings. In particular there are two
> >> +     * known problems
> 
> "two known problems" but...
> 
> >> +     *
> >> +     *   - The QMP monitor needs to use the C locale rules for numeric
> >> +     *     formatting. This would need a double/int -> string formatter
> >> +     *     that is locale independant.
> > 
> > "independent"
> > 
> >> +     *
> >> +     *   - The QMP monitor needs to encode all data as UTF-8. This needs
> >> +     *     to be updated to use iconv(3) to explicitly convert the current
> >> +     *     locale's charset into utf-8
> >> +     *
> >> +     *   - Lots of codes uses is{upper,lower,alnum,...} functions, expecting
> > 
> > "code"
> > 
> >> +     *     C locale sorting behaviour. Most QEMU usage should likely be
> >> +     *     changed to g_ascii_is{upper,lower,alnum...} to match code
> >> +     *     assumptions, without being broken by locale settnigs.
> > 
> > "settings"
> 
> ...three bullet points.

Heh, I knew I should have used "some" instead of "two" earlier when
first writing this. It was inevitable I'd think of another problem
to add :-)

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Bandan Das <bsd@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [Qemu-devel] [PATCH v2] vl: set LC_CTYPE early in main() for all code
Date: Mon, 15 Apr 2019 16:51:25 +0100	[thread overview]
Message-ID: <20190415155125.GN5718@redhat.com> (raw)
Message-ID: <20190415155125.2OjaCimnHJk7toSgyr9A14Fh-h3R0Ja6XOyWJatQV6c@z> (raw)
In-Reply-To: <0ade556d-bdf1-4440-472a-1e3e6cb7387a@redhat.com>

On Mon, Apr 15, 2019 at 10:25:03AM -0500, Eric Blake wrote:
> On 4/15/19 9:25 AM, Peter Maydell wrote:
> > On Mon, 15 Apr 2019 at 15:17, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >>
> 
> > A few typo nits below...
> 
> Also:
> 
> > 
> >>
> >> +    /*
> >> +     * Ideally we would set LC_ALL, but QEMU currently isn't able to cope
> >> +     * with arbitrary localization settings. In particular there are two
> >> +     * known problems
> 
> "two known problems" but...
> 
> >> +     *
> >> +     *   - The QMP monitor needs to use the C locale rules for numeric
> >> +     *     formatting. This would need a double/int -> string formatter
> >> +     *     that is locale independant.
> > 
> > "independent"
> > 
> >> +     *
> >> +     *   - The QMP monitor needs to encode all data as UTF-8. This needs
> >> +     *     to be updated to use iconv(3) to explicitly convert the current
> >> +     *     locale's charset into utf-8
> >> +     *
> >> +     *   - Lots of codes uses is{upper,lower,alnum,...} functions, expecting
> > 
> > "code"
> > 
> >> +     *     C locale sorting behaviour. Most QEMU usage should likely be
> >> +     *     changed to g_ascii_is{upper,lower,alnum...} to match code
> >> +     *     assumptions, without being broken by locale settnigs.
> > 
> > "settings"
> 
> ...three bullet points.

Heh, I knew I should have used "some" instead of "two" earlier when
first writing this. It was inevitable I'd think of another problem
to add :-)

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


  parent reply	other threads:[~2019-04-15 15:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 14:15 [Qemu-devel] [PATCH v2] vl: set LC_CTYPE early in main() for all code Daniel P. Berrangé
2019-04-15 14:15 ` Daniel P. Berrangé
2019-04-15 14:25 ` Peter Maydell
2019-04-15 14:25   ` Peter Maydell
2019-04-15 15:25   ` Eric Blake
2019-04-15 15:25     ` Eric Blake
2019-04-15 15:46     ` Peter Maydell
2019-04-15 15:46       ` Peter Maydell
2019-04-15 15:51     ` Daniel P. Berrangé [this message]
2019-04-15 15:51       ` Daniel P. Berrangé
2019-04-16  7:49 ` Markus Armbruster
2019-04-16  7:49   ` Markus Armbruster
2019-04-16  9:03   ` Daniel P. Berrangé
2019-04-16  9:03     ` Daniel P. Berrangé
2019-04-16 16:01     ` Markus Armbruster
2019-04-16 16:01       ` Markus Armbruster
2019-04-16 16:09       ` Daniel P. Berrangé
2019-04-16 16:09         ` Daniel P. Berrangé
2019-04-16 19:19         ` Markus Armbruster
2019-04-16 19:19           ` Markus Armbruster

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=20190415155125.GN5718@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bsd@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.