[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1358022 - in /subversion/trunk: LICENSE NOTICE subversion/include/svn_utf.h subversion/libsvn_subr/utf_width.c subversion/svn/file-merge.c

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Mon, 9 Jul 2012 16:04:42 +0200

On Mon, Jul 9, 2012 at 3:30 PM, Stefan Sperling <stsp_at_apache.org> wrote:
> On Mon, Jul 09, 2012 at 02:47:25PM +0200, Bert Huijben wrote:
>> How do you check if the file you are merging is valid utf-8?
>
> See the merge_chunks() function.
>
> We convert data to UTF-8 from the native (locale) encoding.
> This cannot fail (every encoding can be represented in UTF-8)
> but the result might look funny in case the file uses some other encoding
> than the native one. But that's OK -- this conversion happens only for
> display purposes, data in the actual file is never changed, so you can
> still edit individual chunks in their original form.

I'm a bit confused (encoding issues always confuse me). If we only
care about the width of the string for display purposes, doesn't this
(also) depend on the encoding used by the console / terminal? How does
that actually work: if you have a UTF-8 encoded file, and you 'cat' it
to a terminal with LC_ALL=iso_8859_1 ... ?

-- 
Johan
Received on 2012-07-09 16:05:39 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.