开发者

french chraracters in browsers

开发者 https://www.devze.com 2023-02-01 19:46 出处:网络
What is the solution to correctly display french characters in all browsers? no开发者_运维技巧w i get in some browsers this: (pr�sent�s)

What is the solution to correctly display french characters in all browsers? no开发者_运维技巧w i get in some browsers this: (pr�sent�s) Thanks.


One solution is to learn how to use Unicode.

  • The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

Try UTF-8 encoding on all your pages and encoding all your strings to UTF-8.


You should specify a content type for the page, and specify what encoding you use for creating the page. Example:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


You need to select a character encoding for your page. In your editor, save to that encoding, and specify in the HTML <head> section:

<meta http-equiv="Content-Type" content="text/html; charset=The_Chosen_Encoding" />

Suitable encodings for French include ISO-8859-1 (aka Latin-1) and UTF-8.

Alternatively, you may stick to plain ASCII and use HTML entities for the accentuated letters, such as:

  • &eacute; for é
  • &egrave; for è
  • etc.


Just use this in you html

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

and if you're using php additionally this in your php-script

header ('Content-type: text/html; charset=utf-8');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号