[ubuntu-mono] [Bug 235858] [NEW] Mono 1.2.6 Runtime has a bug in System.Text.Encoding Assembly
akiladila
aquil.abdullah at gmail.com
Thu May 29 19:48:53 UTC 2008
Public bug reported:
Binary package hint: mono-runtime
Release: Ubuntu 8.04 Hardy Heron
Package: mono-runtime installed version: 1.2.6+dfsg-6ununtu3
My Code:
using System;
using System.Text;
using System.Globalization;
using System.IO;
public class SamplesEncoding {
public static void Main() {
Encoding _encoding = null;
Console.WriteLine("The OEM Code Page Identifier is {0}",
CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
try{
_encoding = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
}catch(NotSupportedException e){
Console.WriteLine("You are toast got exception");
Console.WriteLine(e.ToString());
Environment.Exit(1);
}
Console.WriteLine("Exiting Normally, Goodbye");
}
}
Code Built via command:
gmcs /out:encoding_test.exe /t:exe encoding.cs
Command used to execute code:
mono encoding_test.exe
Results:
aha at stanwyk:~/scratch/zip_test$ mono encode_test.exe
The OEM Code Page Identifier is 437
You are toast got exception
System.NotSupportedException: CodePage 437 not supported
at System.Text.Encoding.GetEncoding (Int32 codePage) [0x00000]
at SamplesEncoding.Main () [0x00000]
Expected results:
aha at stanwyk:~/scratch/zip_test$ ~/tools/mono-1.2.6/bin/mono encode_test.exe
The OEM Code Page Identifier is 437
Exiting Normally, Goodbye
Methodology used to identify bug:
1. I compiled Mono 1.2.6 from the source at Novell using:
./configure --prefix=/home/aha/tools/mono-1.2.6
make
make install
2. I then compiled the source listed above using the mono distributed with Hardy Heron
3. I attempted to run the Assembly encoding_test.exe using the mono runtime distributed with Hardy Heron
and received an exception
4. I ran the same code using the mono runtime that I compiled from scratch and the code ran as expected.
** Affects: mono (Ubuntu)
Importance: Undecided
Status: New
--
Mono 1.2.6 Runtime has a bug in System.Text.Encoding Assembly
https://bugs.launchpad.net/bugs/235858
You received this bug notification because you are a member of MOTU Mono
Team, which is subscribed to mono in ubuntu.
More information about the Ubuntu-mono
mailing list