Welcome to Centmin Mod Community
Become a Member

� Characters encoding issue

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by jcat, Aug 20, 2015.

  1. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    Hello,

    Been at this for a while, was hoping someone had some ideas to try. We put up a site that uses french characters example:

    é, è, ç

    but on the site they are showing up as
    Qu�bec
    as an example.

    Its just a .html file with the characters right in the .html, not pulling from a database or anything special.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    3:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    can you post an example html source code for file to Gist · GitHub so we can see/try it out

    also what text editor and ftp client you using ? do you get same problem if you create the file via SSH using linux text editor like vi, vim or nano ?
     
  3. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    index.html · GitHub

    That is the first 40~ lines of the .html

    Here is an example using nano.

    http://urgence07.ca/mtq/index2.html

    I just copy / pasted those characters that I posted into my original post into that index2.html that I created using nano.

    I had tried using dos2unix on the original .html but then also tried doing what you suggested already and pasting it directly into a newly created .html using nano.

    Appreciate your help!
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    3:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    looks fine on my test server just copy and paste some of the gist source html into html file via nano

    upload_2015-8-20_4-9-43.png

    on you server what does output from command give ?

    Code:
    locale
    i.e.
    Code:
    locale
    LANG=C
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=
     
  5. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    Strange, this is just a default install of centmin, nothing out of the ordinary.

    [root@server1 mtq]# locale
    LANG=C
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    3:04 AM
    Nginx 1.13.x
    MariaDB 5.5
  7. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    [root@server1 mtq]# grep utf /usr/local/nginx/conf/nginx.conf
    charset utf-8;

    I don't want to waste to much of your time, I may just do a fresh install and see but if you have a few more ideas off the top of your head Ill give them a go.
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    3:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah i'm off to bed now.. so don't have anything else right now besides ensuring your SSH client has UTF-8 support set

    i.e. for me in SecureCRT

    upload_2015-8-20_4-35-0.png

    or browser issue
     
    • Informative Informative x 1
  9. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    Will check, appreciate the assistance, have a good night!
     
  10. jcat

    jcat Member

    53
    13
    8
    Jun 21, 2015
    Ratings:
    +20
    Local Time:
    12:04 PM
    Wow yeah that did work, you're awesome I never would of thought to check there. No idea when or why that would have been changed but it was indeed not set to UTF-8 and resolved it. Thanks a million!
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    30,945
    6,914
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,411
    Local Time:
    3:04 AM
    Nginx 1.13.x
    MariaDB 5.5
    Glad to hear :)