Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Description of Problem:
The IndexOutOfRangeException is thrown when calling:
where input contains Unicode surrogate pair, such as smiley.
Steps to reproduce the problem:
1. call this Encoding.GetEncoding("iso-8859-1").GetBytes("\ud83d\ude0a ");
IndexOutOfRangeException is thrown
No exception is thrown; three bytes are returned.
How often does this happen?
This BUG is new to Mono version 4.
I have tested this on Mono 126.96.36.199 and 3.2.8 (Debian) without exception.
The exception was risen on Mono 4.4.1.
Thank you for the bug report!
I implemented a fix in this pull request: https://github.com/mono/mono/pull/3489
This was merged to mono master/4b5eace32dc2c6353425f9ee75299b7fc3e43e02 and mono-4.6.0-branch/50e81ed6e587222f9af6b9d372ea7f798e145236