Bug 40702 - Unicode in Button Text not displayed correctly
Summary: Unicode in Button Text not displayed correctly
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.2.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-04-26 13:30 UTC by Aleksey Kliger
Modified: 2017-11-24 02:29 UTC (History)
5 users (show)

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

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:

Description Aleksey Kliger 2016-04-26 13:30:39 UTC
Consider the following:

    open Xamarin.Forms
    type App() = 
        inherit Application()
        let stack = StackLayout(VerticalOptions = LayoutOptions.Center)
        let label = Label(HorizontalTextAlignment = TextAlignment.Center, Text = "Welcome to F# Xamarin.Forms!")
        let button = Button(Text = "\u2907 should be =>")
            base.MainPage <- ContentPage(Content = stack)

What I expect:  App has a button that has a label that says "⤇ should be =>".
What I get instead: App with a button that has a label that says "? should be =>" (the ? is a box with a question mark in it)
Comment 1 Dave Friedel 2016-07-20 22:02:11 UTC
Can this be added to next release?  It is blocking for me.
Comment 2 adrianknight89 2016-09-30 05:06:19 UTC
I don't think this is an XF issue. This is probably because your font does not support that special character.

See http://www.fileformat.info/info/unicode/char/2907/fontsupport.htm

iOS uses SanFranciscoUIDisplay and SanFrancisoText. Android uses Roboto.

You could try using a custom font to see if the issue is fixed.
Comment 3 Aleksey Kliger 2016-09-30 14:47:10 UTC
Yea, seems like a font issue.  Using arrows from the U+2190-U+21FF block (specifically U+2192 and U+21D2) works as expected with XF deploying to iOS, for example.  Also various other codepoints (U+0092 for example) with good font coverage works as expected.
Comment 4 Shimmy 2017-11-24 02:29:44 UTC
I'm trying to use Unicode characters in a XF Button running under UWP.
I tried `U+E105` and `u\E105`, both of them display literally ("U+105" or "u\105" respectively).

Am I missing something?