问题
I use to Materiul-UI kit for react, After build, UTF-8 character set does not correctly display.
Instead of UTF-8 character set exc. 'Ş,Ü,ö,Ç,ç', Shows that question symbol. '?'
I try this on my single page html.
<meta charset="utf-8">
but doesn't work. Giriş --> Giri?
回答1:
Well, if you have added the meta tag with charset to html <head>
there might be a problem with:
- Your code editor or IDE is not using UTF-8 charset (check your settings).
- You're using a custom font in your app that hasn't these characters. (maybe you're only add
font-family: "yourFont";
but you should use a alternative font family when you have a character that doesn't exists in your custom font familyfont-family: "yourFont", sans-serif;
) - If you're writing your code using accented or special chars like you mentioned above in different encoding setting f.e.
ISO-8859-15
in your code editor/IDE and using webpack, you can try a plugin from here React + Webpack character enconding issues.
来源:https://stackoverflow.com/questions/58486833/react-charset-not-display-correctly-utf-8