[Mono-bugs] [Bug 512774] New: Unhandled Exception in Normalization.Combine() (called String.Normalize()) with Greek Unicode characters
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jun 12 14:01:44 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=512774
Summary: Unhandled Exception in Normalization.Combine() (called
String.Normalize()) with Greek Unicode characters
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: tom.philpot at logos.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11
The following program throws an UnhandledException when trying to normalize a
series of greek characters. See the program included in "Steps to Reproduce"
Reproducible: Always
Steps to Reproduce:
1. Compile and run the following program:
using System;
using System.Text;
namespace NormalizationTest
{
class Program
{
static void Main(string[] args)
{
byte[] utf8Bytes = new byte[] {0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x85};
string strToNormalize =
System.Text.Encoding.UTF8.GetString(utf8Bytes);
Console.WriteLine("Converted from Hex: {0}", strToNormalize);
Console.WriteLine("Composed Normalized String:
IsNormalized(NormalizationForm.FormC) = {0}",
strToNormalize.IsNormalized(NormalizationForm.FormC));
Console.WriteLine("{0}",
strToNormalize.Normalize(NormalizationForm.FormC));
}
}
}
Actual Results:
WS1048:Debug tom.philpot$ /opt/mono/bin/gmcs NormTest.cs /out:NormTest.exe &&
/opt/mono/bin/mono --debug NormTest.exe
Converted from Hex: ᾀ
Composed Normalized String: IsNormalized(NormalizationForm.FormC) = False
Unhandled Exception: System.SystemException: Internal error: should not happen.
at Mono.Globalization.Unicode.Normalization.Combine
(System.Text.StringBuilder sb, Int32 start, Int32 checkType) [0x00198] in
/Users/tom.philpot/External/mono-project/mcs/class/corlib/Mono.Globalization.Unicode/Normalization.cs:206
at Mono.Globalization.Unicode.Normalization.Combine (System.String source,
Int32 start, Int32 checkType) [0x0003c] in
/Users/tom.philpot/External/mono-project/mcs/class/corlib/Mono.Globalization.Unicode/Normalization.cs:135
at Mono.Globalization.Unicode.Normalization.Compose (System.String source,
Int32 checkType) [0x00011] in
/Users/tom.philpot/External/mono-project/mcs/class/corlib/Mono.Globalization.Unicode/Normalization.cs:121
at Mono.Globalization.Unicode.Normalization.Normalize (System.String source,
Int32 type) [0x00015] in
/Users/tom.philpot/External/mono-project/mcs/class/corlib/Mono.Globalization.Unicode/Normalization.cs:392
at System.String.Normalize (NormalizationForm normalizationForm) [0x00023] in
/Users/tom.philpot/External/mono-project/mcs/class/corlib/System/String.cs:1442
at NormalizationTest.Program.Main (System.String[] args) [0x00000]
Expected Results:
Converted from Hex: ᾀ
Composed Normalized String: IsNormalized(NormalizationForm.FormC) = False
ᾀ
--
Configure bugmail: http://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.
More information about the mono-bugs
mailing list