[Mono-list] encoding german umlauts

Kobayashimaru mail@kobayashimaru.info
Sat, 20 Mar 2004 18:37:31 +0100


Hello folks

I'm having some troubles with german umlauts (=E4, =FC, =F6, =DF) in mono-0=
=2E31. I=20
haven't had these issues in mono-0.26, so I don't think that this is a bug,=
=20
but a configuration problem.
I made some sample code:

=2D-----------------------------------------------------------------------
using System;

class Test
{
	public static void Main()
	{
		string test =3D "a";
		string uml  =3D "=E4";

		//String.IndexOf(string)
		if(test.IndexOf(uml) >=3D 0)=09
				Console.WriteLine("contains umlaut 1");

		//String.IndexOf(char)
		if(test.IndexOf(uml.ToCharArray()[0]) >=3D 0)
				Console.WriteLine("contains umlaut 2");

		//String.Replace(string,string)
		Console.WriteLine(test.Replace(uml, "umlaut"));

		//String.Replace(char,char)
		Console.WriteLine(test.Replace(uml.ToCharArray()[0], 'e'));
	}
}
=2D-------------------------------------------------------------------------
the output is:
=2D-----------------
$ ./test.exe
contains umlaut 1
umlaut
a
=2D-----------------

Of course the IndexOf() Methods should always return -1 and the Replace()=20
Methods should replace nothing.
As you can see, on my computer IndexOf(char) and Replace(char,char) work, b=
ut=20
they  don't work with the string overloads.
As I said I used 0.26 for a long time and there it worked

I compiled from source (official release) with ICU 2.8