I'm trying to capture an SVN log in a string inside a PowerShell script.

On the command line, the encoding of the output is correct, but as soon as I capture it in a string it is not:

PS C:\sandbox> svn log -r1804 https://myserver.here/svn/myrepo
--------------------------------------------------------------
r1804 | myname | 2012-06-07 | 1 line
Here is my log message with a special caractère
--------------------------------------------------------------
PS C:\sandbox> $tempStr = svn log -r1804 https://myserver.here/svn/myrepo | Out-String
PS C:\sandbox> $tempStr
--------------------------------------------------------------
r1804 | myname | 2012-06-07 | 1 line
Here is my log message with a special caractére
--------------------------------------------------------------

If it can help, here is the value of $OutputEncoding on my system:

IsSingleByte      : True
BodyName          : us-ascii
EncodingName      : US-ASCII
HeaderName        : us-ascii
WebName           : us-ascii
WindowsCodePage   : 1252
IsBrowserDisplay  : False
IsBrowserSave     : False
IsMailNewsDisplay : True
IsMailNewsSave    : True
EncoderFallback   : System.Text.EncoderReplacementFallback
DecoderFallback   : System.Text.DecoderReplacementFallback
IsReadOnly        : True
CodePage          : 20127

Thanks !!

EDIT:

I've also tried the XML output from SVN as follow, but with no luck!

$CmdLine = "svn log -r40:HEAD https://myserver.here/svn/myrepo --xml";

$Logs = [xml](Invoke-Expression $CmdLine);

foreach ($Commit in $Logs.log.logentry)
{
   Write-Host $Commit.msg;
}

EDIT #2:

I don't know if it may help, but I've noticed that the same issue is there simply using the XML output format directly on the PowerShell console prompt:

PS C:\repo> svn log -r999:999
----------------------------------------------------
Edit
Report