开发者

Writing PHP in Notepad++, and using Spanish letters?

开发者 https://www.devze.com 2023-02-13 11:25 出处:网络
I don\'t get it - what encoding sho开发者_Go百科uld I use? I\'ve been using ANSI, but when I save the document, Spanish letters are converted to illegible markings.

I don't get it - what encoding sho开发者_Go百科uld I use? I've been using ANSI, but when I save the document, Spanish letters are converted to illegible markings.

Any suggestions?


In general, for almost any document, you should use UTF-8 without a BOM. (The exception is documents targeting most Asian countries which are usually more efficiently stored in UTF-16).

You also need to make sure that:

  • it doesn't get transcoded en-route
  • any database the data is stored in is UTF-8 aware
  • any <meta> element in an HTML document that states an encoding states the correct encoding. (If the document is intended for viewing from a file system instead of over HTTP then add such an element)
  • the HTTP headers state that the document is UTF-8


you should use UTF-8 without BOM

0

精彩评论

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