You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Lemes <er...@gmail.com> on 2006/06/08 21:41:04 UTC

Problems Encoding

Hello there,

I'm trying to get more information about how svn Windows command line tools
works with encoding.

When I do a
svn log http://myrepo -r x
I got allways the standard output in the machine's codepage?

My problem is... I'm trapping the stdout of svn tools in a .Net application.
When I do a --xml in svn command, I receive it in UTF8. When I do svn or
svnlook without --xml option, I got wrong chars trapping the output in UTF8
or ANSI.

Is this a problem in brazilian localization? Anyone knows how to tell svn
tools to everytime sends his output in utf-8 or to force svn to US locale?


[]'s

Eric Lemes

Re: Problems Encoding

Posted by Mathias Weinert <Ma...@hyposystems.de>.
Eric Lemes wrote:
> On 6/9/06, Samuel Langlois <sl...@ilog.fr> wrote:
> Hello,
> 
> I have the same thing in French localization:
> C:\>svn --version
> svn, version 1.3.2 (r19776)
>     compil?\195?\169 May 26 2006, 13:10:00
> 
> It seems svn spits UTF-8, which the basic Windows Command Prompt cannot 
handle. 
> Setting the LANG environment variable to en_US switches to English 
messages, which is an acceptable workaround for me.
> 
> Well.. I think he doesn't spit UTF-8. I'm trapping the stdout with a C# 
app, and reading the input with utf-8 encoding for svn --xml, I got all 
chars okay. Trapping svnlook stdout I got scrambled chars. 
> 
> I think svn command line tools uses Windows Regional settings for his 
localization and he spits chars in the "codepage" configured in Regional 
Settings "Advanced" Tab (in the "select a language for non-unicode 
programs). My problem is that when I set this to "Brazilian Portuguese", 
svn tools spit good chars in windows console, but I can't trap the stdout 
from my C# app in UTF8 or Default (ANSI Encoding, iso-8859-1 I think).
> 
> The LANG=en_US didn't affected anything.
> 
> I did a test with a common text-file, saved as ANSI with weird chars: 
"çã". In a HEX editor, these to chars goes as E7 and E3. 
> 
> With a svnlook > textfile.txt (as ANSI too), I got 87 and C6 for the 
same chars. 
> 
> Seeing the output of the UTF-8 file (parsed from svn --xml), I got two 
bytes for every weird char: "ç" = C3 A7, "ã" = C3 A3.
> 
> 
> Thanks anyway,

Just set the APR_ICON_PATH environment variable to the iconv
path of your subversion installation and it should work.

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Problems Encoding

Posted by Eric Lemes <er...@gmail.com>.
On 6/9/06, Samuel Langlois <sl...@ilog.fr> wrote:
>
> Hello,
>
> I have the same thing in French localization:
> C:\>svn --version
> svn, version 1.3.2 (r19776)
>     compil?\195?\169 May 26 2006, 13:10:00
>
> It seems svn spits UTF-8, which the basic Windows Command Prompt cannot
> handle.
> Setting the LANG environment variable to en_US switches to English
> messages, which is an acceptable workaround for me.
>

Well.. I think he doesn't spit UTF-8. I'm trapping the stdout with a C# app,
and reading the input with utf-8 encoding for svn --xml, I got all chars
okay. Trapping svnlook stdout I got scrambled chars.

I think svn command line tools uses Windows Regional settings for his
localization and he spits chars in the "codepage" configured in Regional
Settings "Advanced" Tab (in the "select a language for non-unicode
programs). My problem is that when I set this to "Brazilian Portuguese", svn
tools spit good chars in windows console, but I can't trap the stdout from
my C# app in UTF8 or Default (ANSI Encoding, iso-8859-1 I think).

The LANG=en_US didn't affected anything.

I did a test with a common text-file, saved as ANSI with weird chars: "çã".
In a HEX editor, these to chars goes as E7 and E3.

With a svnlook > textfile.txt (as ANSI too), I got 87 and C6 for the same
chars.

Seeing the output of the UTF-8 file (parsed from svn --xml), I got two bytes
for every weird char: "ç" = C3 A7, "ã" = C3 A3.


Thanks anyway,


[]'s

Eric Lemes

RE: Problems Encoding

Posted by Samuel Langlois <sl...@ilog.fr>.
Hello,

I have the same thing in French localization:
C:\>svn --version
svn, version 1.3.2 (r19776)
    compil?\195?\169 May 26 2006, 13:10:00

It seems svn spits UTF-8, which the basic Windows Command Prompt cannot handle.
Setting the LANG environment variable to en_US switches to English messages, which is an acceptable workaround for me.

Hope this helps,
--
Samuel Langlois 

________________________________________
From: Eric Lemes [mailto:ericlemes@gmail.com] 
Sent: jeudi 8 juin 2006 23:41
To: users@subversion.tigris.org
Subject: Problems Encoding

Hello there,

I'm trying to get more information about how svn Windows command line tools works with encoding.

When I do a 
svn log http://myrepo -r x
I got allways the standard output in the machine's codepage?

My problem is... I'm trapping the stdout of svn tools in a .Net application. When I do a --xml in svn command, I receive it in UTF8.
When I do svn or svnlook without --xml option, I got wrong chars trapping the output in UTF8 or ANSI.

Is this a problem in brazilian localization? Anyone knows how to tell svn tools to everytime sends his output in utf-8 or to force
svn to US locale?


[]'s

Eric Lemes



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org