https://bugzilla.novell.com/show_bug.cgi?id=402128
Summary: CultureInfo serialization bug
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Blocker
Priority: P5 - None
Component: CORLIB
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
CultureInfo does not properly serialized or deserialized
Sample:
class Program
{
static void Main()
{
var culture = new CultureInfo("en-US");
var ms = new MemoryStream();
var formatter = new BinaryFormatter();
formatter.Serialize(ms, culture);
ms.Seek(0, SeekOrigin.Begin);
var deserializedCulture =
(CultureInfo)formatter.Deserialize(ms);
Console.WriteLine(deserializedCulture.Parent);
}
}
Expected result:
en
Actual result:
Unhandled Exception: System.ArgumentException: Culture ID 0 (0x0000) is not a
supported culture.
Parameter name: culture
at System.Globalization.CultureInfo..ctor (Int32 culture, Boolean
use_user_override, Boolean read_only) [0x00000]
at System.Globalization.CultureInfo..ctor (Int32 culture, Boolean
use_user_override) [0x00000]
at System.Globalization.CultureInfo..ctor (Int32 culture) [0x00000]
at System.Globalization.CultureInfo.get_Parent () [0x00000]
at MonoCultureInfoBug.Program.Main () [0x00000]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs