开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜