From: Ian Campbell <ian.campbell@citrix.com>
To: Philipp Hahn <hahn@univention.de>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] VHD: Fix locale aware character encoding handling
Date: Wed, 11 Mar 2015 12:30:38 +0000 [thread overview]
Message-ID: <1426077038.21353.230.camel@citrix.com> (raw)
In-Reply-To: <a6acdfff6a48dccf7df4c3d3fab94ea548fa1ff2.1425811906.git.hahn@univention.de>
On Sun, 2015-03-08 at 11:54 +0100, Philipp Hahn wrote:
> ASCII is 7 bit only, which does not work in UTF-8 environments:
> > failed to read parent name
>
> Setup locale in vhd-util to parse LC_CTYPE and use the right codeset
> when doing file name encoding and decoding.
>
> Increase allocation for UTF-8 buffer as one UTF-16 character might use
> twice as much space in UTF-8 (or more).
>
> Don't check outbytesleft==0 as one UTF-8 characters get encoded into
> 1..8 bytes, so it's perfectly fine (and expected) for the output to have
> remaining bytes left.
>
> Test-case:
> $ ./vhd-util create -n ä.vhd -s 1
> $ ./vhd-util snapshot -n snap.vhd -p ä.vhd ; echo $?
>
> See
> <http://unix.stackexchange.com/questions/48689/effect-of-lang-on-terminal>
> for more information about the details of handling the encoding right.
>
> Signed-off-by: Philipp Hahn <hahn@univention.de>
I'm a bit perplexed over why libvhd is even trying to interpret these
bytes, I probably don't want to know...
Anyway: acked + applied, thanks.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-03-11 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 10:54 [PATCH] VHD: Fix locale aware character encoding handling Philipp Hahn
2015-03-11 12:30 ` Ian Campbell [this message]
2015-03-12 16:05 ` Philipp Hahn
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=1426077038.21353.230.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=hahn@univention.de \
--cc=xen-devel@lists.xen.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.