[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,=
but a configuration problem.
I made some sample code:

using System;

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

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

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

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

		Console.WriteLine(test.Replace(uml.ToCharArray()[0], 'e'));
the output is:
$ ./test.exe
contains umlaut 1

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=
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