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

Re: [PROPOSAL] Using binary mode in Python open() calls

From: Jesper Steen Møller <jesper_at_selskabet.org>
Date: 2006-04-18 03:17:38 CEST

Mark Phippard wrote:

> Michael Haggerty <mhagger@alum.mit.edu> wrote on 04/17/2006 04:27:58 PM:
>
> > - The contents of the file itself would not be in the correct text
> > format for the local platform. This would make it difficult to look at
> > or process a test's intermediate results using the platform's standard
> > tools.
>
> Other than OS/400, I cannot think of any platform that does any kind
> of translation of the text encoding. What problems are you
> anticipating here?

If I read the docs correctly, then the new Visual Studio 2005 CRT will
actually look for BOMs if a file is opened in text mode, and silently do
Unicode->ANSI conversion as needed - yuck!

<http://msdn2.microsoft.com/en-us/library/yeby3zcb(VS.80).aspx>

This will be a problem for UTF-8 files read as text, which is how the
config files are de-facto read (you may recall the thread with the
Chinese mod_dav_svn user with an authz problem).

Letting the CRT convert UTF-8 -> ANSI would be a dangerous thing.
Another good reason for using binary!

-Jesper

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 18 03:15:27 2006

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.