Problems entering accented characters

  • Ian

    Ian - 2014-01-27

    I'm trying to enter the name Alfonso Cuarón into my database/ The table and the collation are both UTF-8. I enter Cuarón into the last name field and Adminer then displays it as Cuarón.

    Since Adminer supports UTF-8 and the table's collation and encoding are UTF-8, why is it not displaying correctly in Adminer when I enter it directly? How else can I debug this?

  • Jakub Vrána

    Jakub Vrána - 2014-01-27

    First of all, what's your driver? I couldn't reproduce it with MySQL.

  • Ian

    Ian - 2014-01-27

    Is this the info you're looking for?
    Client API library version 5.5.34-MariaDB
    Client API header version 5.5.32

    what I find really odd is that if I enter the name through one of my own web forms it goes in ok. But I have a few quick updates to make that adminer is perfect for, so I'm scratching my head why I'm having this issue.

    UPDATE: had this thought as I was heading off to sleep: adminer was installed when the db was still running as Latin1. would that have set up something different that could be causing this? Should I re-install adminer now that we've migrated to UTF-8?

    Last edit: Ian 2014-01-28
  • Ian

    Ian - 2014-01-29

    Ok...still scratching my head on this one.

    Grabbed the latest Adminer, 4.0.2.

    Database is utf8, collation is utf8_general_ci, table and column are too.

    Go to change Alfonso Cuaron to Alfonso Cuarón. Edit the entry, go to the last name field and type Cuar[Alt-0243]n. It appears in the Adminer entry form as Cuarón. I save the edit and once again Adminer displays the row as Cuarón.

    Nginx is serving up an UTF-8 charset. PHP is configured for UTF-8. Mysql is configured for UTF-8.

    I went to one of my php data entry forms and created a Bob Cuarón. It showed up fine.
    I SSH'd into the server fired up a mysql command line and ran an update sql line with Cuarón. That worked. But trying to change it in Adminer still kept giving me Cuarón.

    I'm loving Adminer but this is increasing my caffeine intake. :-)

  • Ian

    Ian - 2014-02-06

    Still having this issue...any way i can get more debug info for you?

  • Paul

    Paul - 2014-02-08

    I tried an edit/save with adminer versions 3.7.1 and 4.0.3, and I do not see this trouble.

    I don't mind trying other ideas, but I cannot reproduce.

    • Ian

      Ian - 2014-02-09

      But what can I do to give debug info on this issue? I even created a new database and the same thing happened, even though the tables, columns, collation were all UTF-8.

      Again, utf-8 settings in php.ini, my.cnf, nginx.cnf. With my own web forms I can enter/retrieve UTF-8. Using the mysqlnd driver.

      Just did another test. Entered John Doé into adminer. The resulting SQL command was INSERT INTO people (first, middle, last, display, url) VALUES ('John', '', 'Doé', NULL, '');

      I really don't know why it's changing the encoding. And I'm loving what I see of Adminer, but this is making it unusable.

      Is there ANY other info that I can give, test, try to get to the bottom of this?

      Have noticed the same issue with phpmyadmin. SQLBuddy handles it just fine, but doesn't have the features I need.

      Last edit: Ian 2014-02-09
  • Paul

    Paul - 2014-02-09

    I tried another entry, and this is what I noted:

    INSERT INTO `applications` (`Name:`, `Number:`, `Breed:`, `Received from:`, `Leaving date:`, `Rescue:`)
    VALUES ('coóler', '1', 'doggy', 'over yonder', '2013-12-12', '');

    The only other thing I can think of at the moment, is does the PHP actually have the mbstring library?

    Earlier, you said an entry at the DB command line was ok, so directly, that would be the DB using its own libs. You also said that phpMyAdmin has the same behavior as Adminer? Is there a warning message on phpMyAdmin's main page [usually in a yellow banner, near the bottom] that has a complaint about the mbstring library?

    Last edit: Paul 2014-02-14
  • Ian

    Ian - 2014-02-12

    Was really hoping that was going to be the issue but it appears (according to phpinfo) that it's installed. Here are the settings.

    Multibyte Support enabled
    Multibyte string engine libmbfl
    HTTP input encoding translation enabled
    libmbfl version 1.3.2
    Multibyte (japanese) regex support enabled
    Multibyte regex (oniguruma) backtrack check On
    Multibyte regex (oniguruma) version 4.7.1

    Directive Local Value Master Value
    mbstring.detect_order auto auto
    mbstring.encoding_translation On On
    mbstring.func_overload 0 0
    mbstring.http_input auto auto
    mbstring.http_output UTF-8 UTF-8
    mbstring.http_output_conv_mimetypes ^(text/|application/xhtml+xml) ^(text/|application/xhtml+xml)
    mbstring.internal_encoding UTF-8 UTF-8
    mbstring.language Neutral Neutral
    mbstring.strict_detection Off Off
    mbstring.substitute_character no value no value

    Are those setting ok?

    Really scratching my head here.

  • Paul

    Paul - 2014-02-13

    My settings: (I've indicated our differences in yellow)

    Multibyte Supportenabled
    Multibyte string enginelibmbfl
    HTTP input encoding translationdisabled
    Multibyte (japanese) regex supportenabled
    Multibyte regex (oniguruma) version4.7.1
    DirectiveLocal ValueMaster Value
    mbstring.detect_orderno valueno value
    mbstring.http_output_conv_ mimetypes^(text/|application/xhtml\+xml)^(text/|application/xhtml\+xml)
    mbstring.internal_encodingno valueno value
    mbstring.substitute_characterno valueno value

    Those are the installed defaults, as I've never modified any values. So, if you have made any adjustments to those settings, try to undo them.

    Last edit: Paul 2014-02-14
    • Ian

      Ian - 2014-02-13

      Will give it a go and get back to you.

    • Ian

      Ian - 2014-02-13

      [holds up winning answer] BINGO!

      Made the changes you suggested and suddenly all is well.

      I made those changes based on a UTF-8 conversion checklist I read on the web. Didn't bookmaark it, so I can't suggest which one to avoid. :-)

  • Paul

    Paul - 2014-02-14

    Excellent! Glad those helped.

    [so this was NOT an Adminer issue!! -- but a mbstring config matter]

    For others that cross this post, know that those highlighted mbstring settings are NOT my suggestion, as those are simply the unaltered installed defaults from my PHP config.

    Granted, some of those mbstring settings MAY have other specific uses, but I would believe that a special need would be necessary before altering the defaults.

    Last edit: Paul 2014-02-14

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks