animetrics / PlistCS

A C# Property List (plist) serialization library.
121 stars 67 forks source link

Problem with 'abnormal' UTF-8 characters. #10

Open Entwicklerpages opened 10 years ago

Entwicklerpages commented 10 years ago

If you want to write a string with a 'abnormal' UTF-8 char like '※' you get a OverflowException: Number Overflow.

This is the exception:

Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.OverflowException: Number overflow.
  at System.Convert.ToByte (Char value) [0x00000] in /Users/builder/data/lanes/mono-mac-ui-refresh-2-10/2baeee2f/source/bockbuild/profiles/mono-2-10/build-root/mono-2.10.11/_build/mono-2.10.11.git/mcs/class/corlib/System/Convert.cs:416 
  at PlistCS.Plist.writeBinaryString (System.String value, Boolean head) [0x0001f] in Plist.cs:645 

Maybe it should be line 644. Perhaps I have added a empty line. Thanks for help.