From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Hahn Subject: Re: [PATCH] VHD: Fix locale aware character encoding handling Date: Thu, 12 Mar 2015 17:05:40 +0100 Message-ID: <5501B954.7060806@univention.de> References: <1426077038.21353.230.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426077038.21353.230.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hello Ian, On 11.03.2015 13:30, Ian Campbell wrote: > 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 ... >> 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. ... > I'm a bit perplexed over why libvhd is even trying to interpret these > bytes, I probably don't want to know... If with bytes you mean the encoding used for the file-name: When creating a snapshot the names are stored UTF-16 encoded for Windows and in UTF-8 for MacOS-X compatibility. Therefore the utility needs to know from which encoding to start. If with bytes you mean the (input|output)-bytes left: yeah, gory UTF-8 details. > Anyway: acked + applied, thanks. Thanks. I hope it builds on BSD or wherever vhd-utils are also used. Philipp