Characters not displaying correctly in different browsers

I used certain characters in website such as • — “ ” ‘ ’ º ©. I found that when testing to see what my website looked like under different browsers (BrowserLab) the afore-mentioned characters are replaced with �.

I then changed the charset in the webpage header from:

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

to

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

Suddenly all the pages have the above mentioned characters replaced with a ?.

Even more puzzling is this is not always consistent across and even within the same page, as some sections display the character • and © correctly.

In particular, I need to replace the character • with one that will display across browsers, can anyone help me with the answer? Thanks.

Answers


You should save your HTML source as UTF8.

Alternatively, you can use HTML entities instead.


The source code needs to be saved in the same encoding as you're instructing the browser to parse it in. If you're saving your files in UTF-8, instruct the browser to parse it as UTF-8 by setting an appropriate HTTP header or HTML meta tag (headers preferable, your web server may be setting one without you knowing). Use a decent editor that clearly tells you what encoding you're saving the file as. If it doesn't display correctly, there's a discrepancy between what you're telling your browser the file is encoded in and what it's really encoded in.


Need Your Help

Migrate VB.NET 2.0 Winform to 3.5 WPF

wpf vb.net winforms .net-3.5 .net-2.0

Is it possible to migrate a VB.NET Winform solution to a 3.5 WPF solution. If so, any suggestions how to do it?

How do I get rid of the rbenv: “command not found” error I keep getting?

rbenv

I installed rbenv with homebrew on my Mac (running OS X 10.9.5) and in the instructions on the rbenv github page it says:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.