Issue 10 in bsd-sharp: Codepage/Unicode Issue
codesite-noreply at google.com
codesite-noreply at google.com
Mon Jun 8 21:56:10 UTC 2009
Updates:
Status: WontFix
Comment #4 on issue 10 by romain.tartiere: Codepage/Unicode Issue
http://code.google.com/p/bsd-sharp/issues/detail?id=10
Just setting LANG and LC_ALL I can have the espected result for the
following program:
{{{
Public Module TestChar
Public Sub Main(Byval Args as String())
Console.WriteLine("140={0}", Asc(Chr(140)))
Console.WriteLine("145={0}", Asc(Chr(145)))
Console.WriteLine("150={0}", Asc(Chr(150)))
End Sub
End Module
}}}
{{{
romain at marvin /tmp % LANG=en_US.ISO8859-1 LC_ALL=en_US.ISO8859-1 mono
foo.exe
140=63
145=63
150=63
}}}
With my default environment (fr_FR.UTF-8) I get:
{{{
romain at marvin /tmp % mono foo.exe
140=50578
Unhandled Exception: System.ArgumentException: Insufficient Space
Parameter name: bytes
at System.Text.UTF8Encoding.InternalGetBytes (System.Char* chars, Int32
count, System.Byte* bytes, Int32 bcount, System.Char& leftOver, Boolean
flush)
[0x00000]
at System.Text.UTF8Encoding.InternalGetBytes (System.Char[] chars, Int32
charIndex, Int32 charCount, System.Byte[] bytes, Int32 byteIndex,
System.Char&
leftOver, Boolean flush) [0x00000]
at System.Text.UTF8Encoding.GetBytes (System.Char[] chars, Int32
charIndex, Int32 charCount, System.Byte[] bytes, Int32 byteIndex) [0x00000]
at Microsoft.VisualBasic.Strings.Asc (Char String) [0x00000]
at TestChar.Main (System.String[] Args) [0x00000]
}}}
Replacing each `Asc` with `AscW` and `Chr` with `ChrW` I also have a
consistent output with both modified and default environments:
{{{
romain at marvin /tmp % LANG=C LC_ALL=C mono foo.exe
140=140
145=145
150=150
}}}
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the freebsd-mono
mailing list