1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    30
    Vote Rating
    0
    willi is on a distinguished road

      0  

    Default Unanswered: special characters are only shown correct in bold texts

    Unanswered: special characters are only shown correct in bold texts


    Hi,

    I'm loading texts from a json-file and special characters are not shown properly in all texts of my application. It took a while until I found out that they're shown correct in text fields with bold formatting. But it seems to be impossible to show the special characters in normal formatted text fields. I've tried all different encodings and the json-file is saved as utf-8 - but no chance!

    For example the sharp S, if I do: Ext.getCmp('myText').setHtml(Ext.String.htmlDecode('ß')); it only works with bold texts (or if I trace it to the console)! And as my json-file is utf-8 I don't even have to de-/encode any special characters in order to show up correctly in bold texts, this works as expected, but not if the text is formatted normal!

    How can I make a normal text showing special characters coming from a json-file!? I can't believe that this is such a problem but I also don't understand why it makes a difference whether the texts are bold or not.

    Any help is extremely appreciated, thanks in advance!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You are using setHtml but talking about text fields where I would expect you to use setValue instead so I feel like I'm missing part of your use case. Would it be possible to get a small test case to clear it up?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Posts
    30
    Vote Rating
    0
    willi is on a distinguished road

      0  

    Default


    Thanks for your response. While building a test case for you I found out that I only have this problems when testing my project on my pc. When I open the same url with my smartphones (ios and android) the special characters are all shown correctly. Sorry for not checking this out before but I didn't expect this to make a difference as I've been testing with safari so far. Now I also tested my project in chrome on my pc and no special character are shown correctly, even not in bold texts.

    Does anybody know what is the reason for this difference (safari/chrome on pc or smartphone)?

Thread Participants: 1