facebook

MySql accented letters.:SOLVED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #348077 Reply

    lemorlenny
    Member

    Hi, I read some records from a MySql database where I have some text fields wrote in Italian language. This text contains some accented letters like ‘èàòù’. When I put this fields in a text area in MobiOne the accented letters are replaced with a question mark. I tried to replace the letters with “&nbsp,&egrave,&#232” etc without success.

    How can I solve my problem?.

    Regards.

    Lenny.

    #348101 Reply

    Hi lemorlenny,

    Could you share the device model and OS that you are using and getting this results?
    I did a small test and couldn’t replicate it.

    #348106 Reply

    lemorlenny
    Member

    @support-octavio wrote:

    Hi lemorlenny,

    Could you share the device model and OS that you are using and getting this results?
    I did a small test and couldn’t replicate it.

    Thank for your reply,
    Actually I test an Android 4.0.4 on a Mediacomm tablet but I already verified the same behaviour on other Android device and Android release.
    I verified that the problem start in the Ajax data encoding so I am in inspecting the Ajax configuration about the international settings.

    Have some suggestions about that?

    Regards.

    #348124 Reply

    Hi,

    Can you share a snippet of code or attach an example file so we can give it a look?

    #348128 Reply

    lemorlenny
    Member

    @support-octavio wrote:

    Hi,

    Can you share a snippet of code or attach an example file so we can give it a look?

    I receive this when try to post my reply:

    Forbidden
    You don’t have permission to access /support-genuitec/posting.php on this server.
    Apache/2.2.0 (Fedora) Server at http://www.genuitec.com Port 80

    Perhaps because it contains SQL syntax? I surrounded it in ‘code’ statement.

    I add my complete message as attachment.

    Regards.

    Attachments:
    You must be logged in to view attached files.
    #348130 Reply

    Hi,

    >Perhaps because it contains SQL syntax? I surrounded it in ‘code’ statement.
    That is the most probably reason. Please attach a sample project that we can take a look.

    #348131 Reply

    lemorlenny
    Member

    @support-octavio wrote:

    Hi,

    >Perhaps because it contains SQL syntax? I surrounded it in ‘code’ statement.
    That is the most probably reason. Please attach a sample project that we can take a look.

    I’ve already attach in my previous post, i hope is enough.

    Regards.

    #348136 Reply

    support-michael
    Keymaster

    A few additional questions:

    1) how do you know the data is saved with the proper charset encoding in DB?
    Have you confirmed it using something like phpadmin or similar db browser utility? This question is to confirm this is not a garage-in, garbage-out situation which can easily happen.

    2) if #1 is returning text data with italian charset then you can focus on the problem being in your php somewhere. I’m not a php guy but in other server side technologies you set define the locale/charset. Have you searched to see if you are configuring your php script correctly for the lang?

    #348176 Reply

    lemorlenny
    Member

    @support-michael wrote:

    A few additional questions:

    1) how do you know the data is saved with the proper charset encoding in DB?
    Have you confirmed it using something like phpadmin or similar db browser utility? This question is to confirm this is not a garage-in, garbage-out situation which can easily happen.

    2) if #1 is returning text data with italian charset then you can focus on the problem being in your php somewhere. I’m not a php guy but in other server side technologies you set define the locale/charset. Have you searched to see if you are configuring your php script correctly for the lang?

    I solved forcing the UTF8 characters coding after opening database:

    
    mysql_connect($dbhost, $dbuser, $dbpass);
    
    $charset = "UTF8";
    if( ! mysql_set_charset("UTF8") ){
        die("mysql_set_charset($charset): unknown charset");
    }
    

    now all my national special characters are correct.

    Regards

    #348187 Reply

    Hi lemorlenny,

    Glad your problem is solved. Thanks for sharing your resolution.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: MySql accented letters.:SOLVED

You must be logged in to post in the forum log in