Results 1 to 4 of 4

Thread: Problem with some utf8 characters on store

  1. #1
    Sencha User
    Join Date
    Apr 2015
    Posts
    3

    Default Problem with some utf8 characters on store

    Hello,

    I am trying to read some data in a database that has passwords encoded in SHA1. This causes that some characters are special characters.

    In my ExtJS store, I have a proxy that reads data from a database in JSON format. The problem is that when the SHA1 passwords have some strange characters, the store doesn't process correctly those records. For example, these are some utf8 characters that create this problem: u0011, u0004, u0014

    The data comes from a PHP script and I have verified that it is sent correctly.

    Why does extjs have problems with this characters?

    This causes a problem because I need to read from the database a SHA1 string and then write it back exactly the same. If I do an utf8_encode I get this characters converted. For example, if I have j(it~$% (there are 2 special characters at the start of the string that are invisible) the utf8_encoding/decoding process returns u001du0007j(it~$%

    Thank you

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Hi,

    In your application, try setting the following:

    Code:
    Ext.USE_NATIVE_JSON = true;
    http://docs.sencha.com/extjs/4.2.1/#...SE_NATIVE_JSON

    Hope this helps,
    Tristan

  3. #3
    Sencha User
    Join Date
    Apr 2015
    Posts
    3

    Default

    Hi,

    Thanks for the tip but I already have that parameter set to true. That solves the issue for most of the utf8 encoded characters but there are some characters that are still not correctly set. What I've seen is that this usually happens with characters that don't have an ASCII representation.

  4. #4
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Can you post the string you are having issue with in CODE blocks so I can reproduce the issue, or better yet provide a fiddle yourself (https://fiddle.sencha.com) so I can walk through the exact issue you're encountering.Thanks,Tristan

Similar Threads

  1. JSON Store with UTF8 characters
    By mgamsjager in forum Ext: Discussion
    Replies: 2
    Last Post: 7 Feb 2014, 10:42 AM
  2. Replies: 1
    Last Post: 16 Jun 2011, 3:44 AM
  3. utf8 - again
    By steffenk in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 14 Jul 2008, 5:19 AM
  4. Problem : Form fields are always utf8.
    By gaetan in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 25 Apr 2008, 7:12 AM

Posting Permissions

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