Stupid web-browser question o' the day...

Posted by: DLF

Stupid web-browser question o' the day... - 26/01/2005 21:03

So when some web pages have double quote marks in their source, they render in my copy of Firefox as little black diamonds w/white ? marks. Is this something wrong under my Language Options or default character encoding (ISO-8859-1), or just sloppy HTML coding?
Posted by: hybrid8

Re: Stupid web-browser question o' the day... - 26/01/2005 22:08

Sample page? I haven't noticed this.

Bruno
Posted by: DLF

Re: Stupid web-browser question o' the day... - 26/01/2005 23:01

So far, the common denominator has been ASP pages made using M$ FrontPage, so I'm about ready to ignore the problem as sloppy HTML coding for sure. Problem is, it's my intranet's corporate standard. So to make a short story long, all my ready examples are inside my firewall. I'll post again the next time I encounter it on a page of the greater 'net.
Posted by: Roger

Re: Stupid web-browser question o' the day... - 27/01/2005 06:49

Quote:
...double quote marks...


Yeah, well they'll have been written using MS Word, and it'll have used "smart quotes". These are outside the normal 0-127 character set, and unless the webserver tells the browser which character set to use, it'll render them wrongly.

Now, IE gets around this problem by using some "heuristics" to spot whether a page is Latin1 or UTF8 or whatever, but I think that Firefox actually trusts what the web server is telling it.

Or something like that. I'm sure Peter will jump in and correct me.
Posted by: peter

Re: Stupid web-browser question o' the day... - 27/01/2005 08:36

Quote:
Is this something wrong under my Language Options or default character encoding (ISO-8859-1), or just sloppy HTML coding?

As Roger says, it's sloppy HTML coding -- the quote marks in question are likely to be literal 0x91..0x94 octets inserted by Word or some other Windows-centric editor. However, unless the page has gone so far wrong as to include those characters but still explicitly set an ISO-8859-1 encoding, you can probably solve the problem by setting the default encoding to Windows Codepage 1252. Certainly Mozilla lets you do this, so I assume Firefox does too. Windows Codepage 1252 is the same as ISO-8859-1 except it has all the Windows nonstandard extension characters between 0x80..0x9F, including the quotes.

For reference for those writing their own pages, there were two right ways for the webmaster to have done it: use the character entities ” and “, or switch to UTF-8 encoding and use U+2018 etc.

Peter
Posted by: DLF

Re: Stupid web-browser question o' the day... - 28/01/2005 19:21

Thanks much, Peter. That is the *exact* explanation I was groping for!

BTW, an example in Firefox would be here on this (Colorado) web page.