[Mono-list] Unicode error during test

Richard Torkar richard.torkar@htu.se
14 May 2002 13:25:45 +0200


--=-5s4paY4KzQi8wANbRdEt
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

When running the attached test.cs I get this:

[toor@~]$ mono test.exe 

** ERROR **: file unicode.c: line 390 (iconv_convert): should not be
reached
aborting...
Aborted

I use mono-0.11_baselabs-20020513 rpms.

What is wrong here? Anyone?
Same type of error occurs in the cygwin environment.

/Richard

--=-5s4paY4KzQi8wANbRdEt
Content-Disposition: attachment; filename=test.cs
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=test.cs; charset=ISO-8859-1

using System;=0D
using System.Globalization;=0D
=0D
namespace ConsoleApplication2=0D
{=0D
	public class testing=0D
	{=09=0D
=0D
		public void testFrom64()=0D
		{=0D
			char[] charArr =3D {'a','s','d','f'};=0D
			string str =3D "rlp7QA=3D=3D";=0D
		=09=0D
			byte[] fromCharArr =3D Convert.FromBase64CharArray(charArr, 0, 4);=0D
			byte[] fromStr =3D Convert.FromBase64String(str);		=09=0D
=0D
			for(int i =3D 0; i < fromCharArr.GetLength(0); i++)=0D
				Console.Write((char)fromCharArr[i]+" ");=0D
			Console.WriteLine();=0D
=0D
			for(int i =3D 0; i < fromStr.GetLength(0); i++)=20=0D
				Console.Write(fromStr[i]+" ");=0D
			Console.WriteLine();=0D
		}=0D
=0D
		public void testTo64(){=0D
=0D
			byte[] toCharArr =3D {174,90,123,64};=0D
			char[] outCharArr =3D new Char[8];		=09=0D
			int kalle =3D 0;=0D
=0D
			try {kalle =3D Convert.ToBase64CharArray(toCharArr,0,4,outCharArr,0);}=0D
			catch (Exception e) {Console.WriteLine("Error occured");}=0D
=0D
			for(int i =3D 0; i < toCharArr.GetLength(0); i++)=20=0D
				Console.Write(toCharArr[i]+" ");=0D
			Console.WriteLine();=0D
		=09=0D
			for(int i =3D 0; i < outCharArr.GetLength(0); i++)=20=0D
				Console.Write(outCharArr[i]+" ");=0D
			Console.WriteLine("\n"+kalle);=0D
=0D
			string berit =3D Convert.ToBase64String(toCharArr);=0D
=0D
			Console.WriteLine(berit);=09=0D
		=09=0D
		}	=09=0D
	}=09=0D
=0D
	public class kribbe=0D
	{=0D
		public static void Main(string[] args)=0D
		{=0D
			testing t =3D new testing();=0D
			t.testFrom64();=0D
			t.testTo64();=0D
			Console.ReadLine();=0D
		}=0D
=0D
	}=0D
}=0D

--=-5s4paY4KzQi8wANbRdEt--