Results 1 to 3 of 3

Thread: Using Ext.Encoding in Android return wrong character encoding

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    3

    Default Using Ext.Encoding in Android return wrong character encoding

    When i use Ext.encode(....) some Russian text i got it with wrong unicode, like - "\\u044f\\u0439\\u0446\\u0430\\u0430\.

    Same from browser works fine.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,451

    Default

    Can I get a runnable test case?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    3

    Default

    Check attachment.
    Unzip it, configure sencha touch path in index html (i created this test under sencha-touch-1.1.0\examples\ directory, so unzip to this directory should works).

    The test is very simply. I do - Ext.encode("?????? ????!") and show result in message box. In Windows Chrome browser the text is shown ok. When i run it from browser in HTC Desire i got "\u0..." result.

    P.S. ?????? ????! - Good Morning!

    Code:
    Ext.setup({
        tabletStartupScreen: 'tablet_startup.png',
        phoneStartupScreen: 'phone_startup.png',
        icon: 'icon.png',
        glossOnIcon: false,
        onReady: function(options) {
            
            var panel = new Ext.Panel({
                fullscreen: true,
                layout: {
                    type: 'vbox',
                    align: 'center',
                    pack: 'center'
                },
                items: [{
                    xtype: 'button',
                    ui: 'normal',
                    text: 'Show Text',
                    handler: function() {
                    
                            var msg = Ext.encode("?????? ????!");
                    
                            Ext.Msg.show({
                                title: ""
                               ,msg:Ext.util.Format.ellipsis(msg, 2000)
                               ,icon:Ext.Msg.ERROR
                               ,buttons:Ext.Msg.OK
                               ,minWidth:1200 > String(msg).length ? 360 : 600
                           });
                    }
                }]
            });
        }
    });
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •