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

Re: Encoding in our APIs

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-05-02 19:45:17 CEST

On Mon, 2 May 2005, Joseph Galbraith wrote:

> Peter N. Lundblad wrote:
> For the first pass, I'd translate everything to the console
> code page.
> If we want to get smarter, we could translate to code page if
> stdout is a console or a pipe, but translate to the file encoding
> (when known) if the output is a file.
> Eventually, because I don't think the pipe case is deterministic
> (i.e., some applications of pipes will want one thing while
> others will want the other) I suspect we need a command line
> flag.
Isn't Brakno's suggestion to use widechar variants for console output the
best? According to him, it will handle the translation for us.

> I would think that unix has the same problem.
> You terminal expects output in one encoding (specified by LANG
> probably), and the file may have a different encoding.
On UNIX, everything is expected to be in the current locale. Ofcourse,
this model is a little simplistic in an environment where you receive
files from people with other locale settings. But for output, you can pipe
through a recoding program. It is not free from problems. But console
encodings doesn't make the Windows case easier. How many files are in the
old DOS codepages?


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 2 19:39:22 2005

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.