Join the community today
Register Now

� Characters encoding issue

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

  1. jcat

    jcat Member

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    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

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    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

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    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

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. jcat

    jcat Member

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    [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

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
     
  9. jcat

    jcat Member

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    Will check, appreciate the assistance, have a good night!
     
  10. jcat

    jcat Member

    153
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +64
    Local Time:
    8:04 AM
    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!
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Glad to hear :)