The Mudcat Café TM
Thread #140951   Message #3241484
Posted By: JohnInKansas
19-Oct-11 - 03:41 PM
Thread Name: Tech: Sign for pound sterling
Subject: RE: Tech: Sign for pound sterling
I had the impression that whatever encoding was set in my browser was used for all pages I viewed. As Newport Boy comments, I don't see any reason why two pages should use a different encoding.

I found that the Index thread showing the list of threads was displaying "Unicode (UTF-8)" in my browser, and there were numerous broken characters in the list. The characters displayed correctly in threads, which were using the "Western European (Windows)" encoding.

Changing the thread listing page to Western European (Windows) encoding displays the characters correctly, and changing this thread page to Unicode (UTF-8) produced the same broken characters for the £.

My IE gives two dozen different encodings to choose from, a fair percentage of which I would expect to use only for pages mostly in languages that, for me, would be "unusual" (and unintelligible).

Other theads have discussed that Unicode requires "double-byte" representation of character numbers in order to represent all the characters defined by the Unicode Standard(s), while most other encodings get by with single-byte numbers. This may explain why the characters look different if a different encoding is selected, but doesn't explain why my browser was using two different encodings for the Index page and for the threads.

In IE, the "Encoding" setting is in the "View" section of the toolbar (View|Encoding). It would appear that people with other browsers may have the same need to play with the encoding, but someone who uses one of the others will have to help find the setting if anyone has a problem as I don't attempt to keep up with them all.

Regardless of how you type it, any correct method of entering the £ should record the number 163 (decimal) or 00A3 (hex) in the page script. The encoding used by the one reading the page determines what number is sent to (read by) your browser, and for some encodings your browser gets a wrong number. The incorrect character number may (rarely?) display some other character, or more often will just show whatever glyph (usually just a blank rectangle) the selected font uses for "unknown" characters.

Since the aberrant behavior comes from your browser settings, it's not just a Mudcat thing so you might expect to encounter similar behavior on other web sites if you have set the browser to "do it wrong" for the page you're viewing.

It may(?) be possible for an HTML Header or a CSS to call for a specific encoding, and some pages might be able to tell your browser what to use for the page it delivers, but I haven't seen many websites that use such a feature visibly. (And for now I'm too lazy to look up more of what a site designer can do to us.)

John