Welcome to WebmasterWorld Guest from 54.145.44.134

Forum Moderators: incrediBILL

Message Too Old, No Replies

sign not displaying correctly - any suggestions?

     

Gemini23

7:57 pm on Nov 4, 2011 (gmt 0)

5+ Year Member



There doubtless is a very simple answer to this...

but when I add a sign to Expression web html page off-line it looks fine.. but when preview and also load to the website - it then displays as £

Help?

Leosghost

9:06 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



charset

use *£* in place of the sign..only use the part between the * and the *..not the *s themselves..

Using the wrong doctype can also give this kind of problem..

lucy24

9:36 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



In the original question, you have utf-8 text being reinterpreted as latin-1. (I'd recognize that leading A-circumflex anywhere!)

Your html files must have a charset declaration, and it must match the character set you use to do the editing.

Some folks will tell you to use entities-- named or numerical-- for all non-ASCII characters. This is serious overkill. It makes your html unreadable, and makes it take up twice as much room (in bytes, disk space and bandwidth) as you go beyond the Latin-1 range. And it's obviously impossible if your base language uses a non-Roman script, so why do English web pages have to stay in the entity ghetto?

Gemini23

10:19 pm on Nov 4, 2011 (gmt 0)

5+ Year Member



Brilliant - thank you good people for an excellent solution! Fixed!

g1smd

10:29 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I recommend that you stop using a pound sign.

Use the GBP code. Google indexes that and savvy shoppers can use it to find sites with prices.

Gemini23

10:38 pm on Nov 4, 2011 (gmt 0)

5+ Year Member



what is the "GBP" Code? do you mean as GBP45.00

g1smd

10:55 pm on Nov 4, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Search: [ISO 4217].


See also: [ISO 639], [ISO 3166], [ISO 8601]. These are basic building blocks of the internet.

penders

11:21 am on Nov 5, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Leosghost: Using the wrong doctype can also give this kind of problem..


I don't see how an incorrect DOCTYPE can cause this? I thought this was a character encoding issue? Or can quirks mode trigger this?!

Some folks will tell you to use entities-- named or numerical-- for all non-ASCII characters. This is serious overkill. It makes your html unreadable, and makes it take up twice as much room (in bytes, disk space and bandwidth)...


...and if your overly HTML entity encoded content is pulled from a DB and intended to be searchable - it won't be.

Having said that, £ (the named HTML entity) is also defined in HTML4.

Leosghost

11:30 am on Nov 5, 2011 (gmt 0)

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Or can quirks mode trigger this?!


Yes..I once spent 3 days "acquiring" the Teeshirt that lets me know this :(

Gemini23

12:26 pm on Nov 5, 2011 (gmt 0)

5+ Year Member



Great how such a 'simple' question can result in so much debate.... so which is best

1. GBP is okay but does it look ok? GDP25.00
does Google look for this more than the actual pound sign? 25.00

2. £ and £ both do the job but concensus on which is best?

:)

penders

3:56 pm on Nov 5, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



what is the "GBP" Code? do you mean as GBP45.00


1. GBP is okay but does it look ok? GDP25.00
does Google look for this more than the actual pound sign? 25.00


The ISO 4217 code ("GBP" for Great British Pound) should be separated from the amount by a space and appear before or after the amount depending on which countries standards you follow. The pound sign () is potentially ambiguous as there are several different currencies that use the pound, as there are with the dollar ($). The ISO code removes this ambiguity. However, whether it is really necessary to use the ISO code is really down to your target audience IMO (as with everything web). If you are running an international site dealing in multiple currencies then the ISO code might be necessary, however, if it's a UK only site then probably whatever is more acceptable to your users. TBH, I think most Brits expect to see the pound sign. All online shops I use, use the pound sign.

2. £ and £ both do the job but concensus on which is best?


Potentially £ will work on more (historic, non-standards compliant) browsers and £ should work on any standards compliant browser made in the last 14+ years?!

lucy24

11:04 pm on Nov 5, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



You forgot the third entity ;) £ The x means we are in hexadecimal rather than decimal encoding.

Named entities are an HTML 4 innovation. So to get a browser that couldn't recognize them you would probably have to have a browser that couldn't read HTML 4. Yes, there are rich conservative potential customers, but I think that's overdoing it :)

Interesting aside: My very oldest browser, MSIE 5.2 for Mac, will only display non-ASCII characters if they have HTML 4 named entities. You don't have to use the entity-- decimal or hexadecimal entities also work, as does the raw character if you change the encoding to UTF-8*-- but the character has to have an entity.


* That's another Very Old Browser issue: It can't read the "charset" declaration so you have to change the encoding manually. I don't know if there exist any newer browsers that lack this ability. I still include boilerplate about it in e-texts, and even on a few of my www pages that are specifically concerned with font display.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month