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

RE: Bug patching Unicode files

From: Hugo González <h.gonzalez_at_ingeciber.com>
Date: Fri, 25 Nov 2016 15:13:41 +0100

On Fri, Nov 25, 2016 at 14:32 PM +0100, Stefan Sperling wrote:
> Hi Hugo,
>
> Subversion only supports Unicode it if is encoded as UTF-8.
>
> Unicode represented in encodings other than UTF-8 is usually treated like
a binary file. Fixing this would be a major effort.
> See https://issues.apache.org/jira/browse/SVN-2194
>
> If you convert files you want to use with 'svn patch' to UTF-8, then
things should "just work". Note that conversion between UTF-8 and UTF-16 is
generally lossless, so in
> the worst case this would add extra (but nonetheless inconvenient)
conversion steps to your workflow.
>
> Regards,
> Stefan

Thank you very much for your quick response, Stefan!

That will solve the problem, as I'm using Visual Studio 2015 that already
supports UTF-8 encoding. I can convert those files once into UTF-8 and
continue working in UTF-8 from Visual Studio.

Just a tip as a C++ developer, in our software (CivilFEM.com) we had some
issues with Unicode files and I finally programmed a small class to handle
the reading and writing of Unicode and ANSI text files. That class handles
the BOM mark and all the conversions, so I can read any text file without
taking care of that. We can even mix or convert those files, the software is
always able to read them, as everything is converted into the same Unicode
encoding (in memory) in that small abstraction class, and we can choose in
which encoding we want to write. But I understand it is a major issue unless
you already have an abstraction class to centralize all the file reads and
writes...

Thank you very much again for your support and best regards,

Hugo González
Received on 2016-11-25 15:12:08 CET

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

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