0

I was developing a simple website in Hungarian language, where special characters like: á, é, ű, ő etc are included in the text (head and body), and it worked perfectly in all browsers when opened from local. Once I uploaded the index.php file to the domain all special characters are displaying wrongly (like small pictures/icons). Page is done on bootstrap

I've tried changing the font-family, changed default language from en to hu, no improvement. Searched for answers already, but can't find what is wrong in my case

<!DOCTYPE html>
<html lang="hu">
<head>

  <title>Vállalati oldal</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
  <style>
  body {
    font: 400 15px Lato, sans-serif;
    line-height: 1.8;
    color: #818181;
  }
  h2 {
    font-size: 24px;
    text-transform: uppercase;
    color: #303030;
    font-weight: 600;
    margin-bottom: 30px;
  }
  h4 {
    font-size: 19px;
    line-height: 1.375em;
    color: #303030;
    font-weight: 400;
    margin-bottom: 30px;
  }  
  .jumbotron {
    background-color: #e3e7e8;
    color: #fff;
    padding: 100px 25px;
    font-family: Montserrat, sans-serif;
  }

I am getting no errors

JJJ
  • 32,902
  • 20
  • 89
  • 102
Jagi
  • 1
  • 1
  • Is the value hard coded in html file or are you fetching from database? – Mani May 16 '19 at 12:37
  • In which encoding is the server delivering your HTML? Encoding setting in the `header` of a response prevails over what is defined in your HTML. – connexo May 16 '19 at 19:01
  • Possible duplicate of [Set HTTP header to UTF-8 using PHP](https://stackoverflow.com/questions/4279282/set-http-header-to-utf-8-using-php) – connexo May 16 '19 at 19:03
  • values are hard coded- no fetching from database – Jagi May 28 '19 at 08:22

1 Answers1

0

I found what the root cause was. First I started with checking if my fonts were supporting special characters (although I would expect strange signs if font would not support already on local). Everything was ok there. Naturally I tried to change fonts for different ones also supporting local language but- no luck. Then I started to think that either there needs to be sth wrong at my hosting side- so when I upload the page to domain or with the uploading process itself. Issue came to be with the uploading process. I am using filezilla for upload of my index.php file and all other files. It came that when I am setting up a connection I needed to do two things: 1. check the option: Force UTF-8 in the charset tab while setting up the connection 2. once connection is set up and before files are uploaded right click in the connection established part of filezila and choose "enter custom command" once small window pops up I put in there a "opts utf-8 on" command, then I got the success message in the main window After all this I have uploaded my files and everything worked perfectly. All special characters are displayed!

Jagi
  • 1
  • 1