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

Re: Feature request: Support of Windows Codepage 850

From: David Huang <khym_at_azeotrope.org>
Date: Sun, 31 Oct 2010 22:23:11 -0500

On Oct 31, 2010, at 1:35 PM, Paul Maier wrote:

> Hi there!
> All output, that comes from the svn internationalization, shows correctly
> on both codepages, 850 and 1252. E. g. error messages or "svn help ci". Good.
> (Font in use is Lucida Console.)
> This shows, that it *is* possible for svn, to produce correct output on both
> codepages, 850 and 1252.
> But output that comes from file data ("svn cat file") only prints correct with
> Codepage 1252. Seems, that this output goes through a different piece of code,
> that is not able to adjust to the Codepage in use.

svn cat just outputs the file that's in the repository... if your file happens to be a a CP1252-encoded text file, but your console expects CP850, I don't think you should expect it to display properly. And how would svn even know that the file is a CP1252-encoded text file? While it does keep track of the MIME type, it doesn't keep track of charset encoding... perhaps I have a Chinese BIG5-encoded file in my repo; if SVN assumed it was CP1252 and tried to do a 1252->850 conversion on it, it'd corrupt the file.

I think svn cat just needs to output the exact bytes of the file, rather than trying to do any conversion. If you want to do charset conversion, you could probably just pipe the output through iconv (available in Cygwin). E.g., svn cat filename | iconv -f cp1252 -t cp850

> (I have to use Codepage 850, because Cygwin needs it.)

I haven't tried it myself, but my understanding is that Cygwin 1.7 honors the locale environment variables. Perhaps try "set LC_CTYPE=de_DE.CP1252" or perhaps one of the other locale variables (LANG? LC_ALL?)
Received on 2010-11-01 04:23:51 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.