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!
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?)
This is an archived mail posted to the Subversion Users mailing list.