Bug 975 - CGPDFDictionary.GetString() returns invalid strings
Summary: CGPDFDictionary.GetString() returns invalid strings
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2011-09-21 17:14 UTC by René Ruppert
Modified: 2011-09-22 04:07 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

4.2-based assembly with the fix (2.26 MB, application/octet-stream)
2011-09-21 21:05 UTC, Sebastien Pouliot

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 Developer Community or GitHub 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.

Related Links:

Comment 1 Sebastien Pouliot 2011-09-21 17:44:47 UTC
Unhandled Exception: System.ArgumentException: invalid utf-16 sequence at 121 (missing surrogate head)
Parameter name: string
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: invalid utf-16 sequence at 121 (missing surrogate head)
Parameter name: string

I got the above (in my Application Output pad) when executing your project and clicking on the link. Did you get the same thing ?
Comment 2 Sebastien Pouliot 2011-09-21 20:40:10 UTC
Fixed in ed777c542ee54d51576e213ff52311a3233a3f72 (master).
The return char* points to an UTF8 encoded array.
Comment 3 Sebastien Pouliot 2011-09-21 21:05:47 UTC
Created attachment 464 [details]
4.2-based assembly with the fix

same as usual, backup, replace, have fun :)
Comment 4 René Ruppert 2011-09-22 04:07:08 UTC
I copied the source from the GIT and can confirm that it is working now. Thanks!