Search code examples
htmlgoogle-chromesafaritextedit

browser adds strange characters instead of html


I'm using textedit in a mac and in all browsers: Safari, Firefox and Chrome. I am getting strange characters instead of quotation marks. My browsers are set to UTF encoding and my textedit is in plain text mode.


Solution

  • Make sure you save the file as UTF-8: TextEdit > Preferences… > Open and Save, and making sure the Save As setting is "Unicode (UTF-8)"

    Also specify the characterset in the html page by adding:

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

    between the tags.