[MonoDevelop] UTF-16 support?
Megan Clodfelter
megan.clodfelter at gmail.com
Mon Mar 26 23:21:32 UTC 2012
Michael -
Many thanks for your reply, unfortunately, I am still having issues. I changed the font display for the entire project to a UTF-16 font (AppleGothic) and my characters appeared just fine.
So far so good. Now, the next step was to display my characters on the iPad. I verified that AppleGothic is a standard iPad font. My objective is to overlay my UTF-16 characters onto an image. I create the UIGraphics context, perform a "SelectFont" using "AppleGothic", a point size and with CGTextEncoding set to "FontSpecific" I see nothing. Obviously, my characters exist in that font, as I can now see them in the code window. When I change the encoding to the incorrect "MacRoman", I see little boxes where my characters should be.
What do I need to do to ensure that UTF-16 characters are displayed as part of a UIGraphics object?
Megan
On Mar 26, 2012, at 5:15 PM, Michael Hutchinson wrote:
> On 26 March 2012 17:38, Megan Clodfelter <megan.clodfelter at gmail.com> wrote:
>> Hi-
>>
>> I'm new to MonoDevelop, but not new to .NET development. I have a C#
>> project with UTF-16 characters, that appear not to be interpreted within
>> MonoDevelop.
>>
>> One of the .cs files in my Project is of UTF-16 encoding, and that
>> MonoDevelop does not display the characters in the code window, nor will it
>> print out the contents of those character strings. I dropped that file from
>> that included project and re-added it, but was not given the option to add
>> my file with encoding.
>>
>> The only place where I saw I could add a file with encoding was in the Open
>> dialog; but that that didn't appear to work either.
>>
>> I can take my Windows C# file, cut and paste the characters into BBEdit and
>> save on my Mac with encoding set as: UTF-16. I then locate the file in the
>> Finder and the characters are as I expect. With the Mono Development
>> environment open, I navigate to my file, select Encoding to "UTF-16" and
>> select Open.
>>
>> I don't see my characters. I see an empty box where the character should be.
>>
>> What are the tips and tricks for getting UTF-16 characters to display and
>> print as part of an included project in MonoDevelop? I'm just not seeing
>> it.
>>
>> I am on version 2.8.6.5.
>
> Most likely this isn't an issue with detecting/loading UTF16, but
> rather with *displaying* it. There was a longstanding bug in Pango,
> the text rendering library used by MonoDevelop, that caused it not to
> handle font fallbacks - i.e. if the main font didn't contain the glyph
> for a given character, it wasn't able to fall back to another font for
> that glyph. It's often possible to work around this by changing the
> text editor font to one that has glyphs for all the characters you
> care about.
>
> The *Mono* 2.10.9 beta contains a new version of Pango (among other
> things) that supports font fallbacks on Mac - I suggest you try that.
>
> --
> Michael Hutchinson
> http://mjhutchinson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20120326/81441956/attachment-0001.html>
More information about the Monodevelop-list
mailing list