How to upload a £

J

Justin Time

Hi Guys

My keyboard has no £ key so if I need one I either copy and paste one or use
alt 0163......... works ok.
Problem :
When I put one in editor though, I see it ok but when uploaded displays a
small square box where the £ sign should be.
Any suggestions on what to do appreciate.
 
J

Justin Time

Ed Mullen said:
Sounds like a character set difference. What do you mean by uploading? To
where? In what form? And what editor are you using?

I use WS ftp to upload to my web pages. I use Coffee cup html 2008 editor. I
upoad to web pages using either. I have tried changing the transfer mode
from auto to binary to ascii but still only a small box shpwing.
 
J

Jukka K. Korpela

Scripsit Justin Time:
My keyboard has no £ key so if I need one I either copy and paste one
or use alt 0163......... works ok.

Or you could use £ in HTML, or you could use a keyboard layout
that assigns £ to some suitable key or combination. Switching between
keyboard layouts is actually rather easy and fast, once you get used to
the idea. E.g., the US International keyboard layout lets you work with
a normal US keyboard with extra features (e.g., AltGr+Shift+4 produces
£, where AltGr = right Alt; not too difficult to remember, since Shift+4
is $).
When I put one in editor though, I see it ok but when uploaded
displays a small square box where the £ sign should be.

Haven't you noticed how often people explain why you should post a URL
to illustrate your problem?

My crystal ball says that the problem is at line 1 of your .htaccess
file (possibly because it is missing).
 
J

Jukka K. Korpela

Scripsit Justin Time:

So you need to create a .htaccess file with the content
AddType text/html;charset=iso-8859-1 html

This will make browsers override the meta hacks that you now have and
that claim the document to be utf-8 encoded (it isn't). If this doesn't
work, your service provider has prevented .htaccess customization.

In that case, or anyway, you could alternatively change utf-8 to
iso-8859-1 in the meta hack. It's simpler, actually.

Or you could use just £.

Or you could _really_ use utf-8, though using it for the sake of
including £ is like shooting at flies with missiles.
 
J

Justin Time

Jukka K. Korpela said:
Scripsit Justin Time:


So you need to create a .htaccess file with the content
AddType text/html;charset=iso-8859-1 html

This will make browsers override the meta hacks that you now have and that
claim the document to be utf-8 encoded (it isn't). If this doesn't work,
your service provider has prevented .htaccess customization.

In that case, or anyway, you could alternatively change utf-8 to
iso-8859-1 in the meta hack. It's simpler, actually.

Or you could use just £.

Or you could _really_ use utf-8, though using it for the sake of including
£ is like shooting at flies with missiles.

Well thanks guys.... now cured even though I didn't rearly understand any of
that. Just changing what you have put above as done it.
iso-8859-1 in the meta hack. It's simpler, actually. <<<<
 
B

Beauregard T. Shagnasty

Beauregard T. Shagnasty replied to hisself:
Couple of other points:

It just hit me. "a small donation of between £5 and £5000" ...

£5000 for an animated graphic? <Whew!>
 
B

Beauregard T. Shagnasty

Justin said:
Beauregard T. Shagnasty said:
Beauregard T. Shagnasty replied to hisself:

It just hit me. "a small donation of between £5 and £5000" ...

£5000 for an animated graphic? <Whew!>
[Please trim signatures in newsgroup posts. Thanks.]
Which is just my way of saying £5 will do but if your daft
enough...........

...and could scare away someone with money.
Thanks for the comma thing. Now altered but maybe not quite right.

http://www.steveonline.info/animatedsignatures.html

You missed the apostrophes.
All my sig's
an animated sig'

This sentence needs work:
"The longer the name, the longer it takes to create, so, ideally no
first and second name requests."

If you have a long name, it will take more time to create. Ideally, I
would not care to make first and second name signatures.

"Please contact [me] for more info...."

"with a white background. " .. Why not use a transparent background?
White doesn't look very good on my pale blue page.
 
L

Lars Eighner

the lovely and said:
My keyboard has no £ key
alt 0163......... works ok.
Problem :
When I put one in editor though, I see it ok but when uploaded displays a
small square box where the £ sign should be.
Any suggestions on what to do appreciate.


Is £ in the declared character set of your document? If not, you must use a
character entity such as &pound; If &pound; does not work, it may be that
the appropriate glyph does not exist in the font as installed in your
browser or system.
 
J

Jukka K. Korpela

Scripsit Lars Eighner:
This reads correctly in my browser (lynx).

That's because the charset info has been fixed to
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
(which is the simple fix - not ideal but works).
 
A

Andy Dingley

My keyboard has no £ key so if I need one I either copy and paste one or use
alt 0163......... works ok.

This is _potentially_ a big complicated area. There's a narrow path
through it to "just make it work" without needing to understand
everything, but you need to listen carefully to advice and do what
you're told. Trying to set off on your own with a partial
understanding (such as using <meta>) is likely to go wrong.

There are levels of understanding you can reach to get it working.
These range for "knowing everything" (read and _understand_ Jukka's
web pages on the subject, together with their links) to "knowing
nothing" (just type in "&pound;" and smile) or else a middle way for
"competent" web coders.

You need to make three things _all_ work to display a "£"
* A client-side font for the user that has a "£" glyph
* A reference to a character that will display as this glyph
* Correctly encoding some bytes so as to be recognised as this
character (that's where most people go wrong).

The font is easy these days. It's also difficult to fix otherwise
(i.e. for ancient browsers and OS) - web coders have always had very
limited control over client-side fonts. If you leave the client-side
font choice with the family names of serif or sans-serif, most
commonplace desktop browsers will now have access to a suitable font
with a glyph that covers "£".

To refer to the character, either enter it from the keyboard (either
by pressing "£" or by pressing Alt-0163). This gives you the correct
character and if you get the encoding right too, then this ought to
work (sounds like it isn't here though).

Now what's an encoding? A "character" is one entry in a list of
characters, "encoding" is the selection of bits and bytes to indicate
which of these characters is meant. For most uses you need to make the
encoding used to read the web page the same as the encoding used to
create it. There are a great many encodings, but they come in three
families (at a vague hand-waving level): ASCII-like, ISO-8859-* and
UTF

ASCII-like encodings are old and only cope with a character set of up
to 127 or possibly 255 characters. This makes them simple "one byte
per character" encodings, but it isn't enough to do international web
work and so they're really not much use any more.

There are a number of ISO-8859-* character sets and encodings. They're
all the same as ASCII for the characters up to 127 (and are thus the
same as each other) but the characters beyond this vary. This gives
the advantage of simple "one byte per character" encoding and also
international coverage of Western languages. Their two disadvantages
are that you must know _which_ ISO-8859-* encoding was used before you
can decode it, also that you can't use two of them simultaneously in
the same document (makes a Russian - Norwegian dictionary difficult).

Then there's Unicode / UTF. Unicode takes the approach of _one_ huge
character set that works for everything from English ASCII though to
Klingon, via French, Norwegian, Russian, Chinese and 17th century
Tamil. You use one of the UTF encodings to handle it. This encoding is
a bit tricky - but that's OK, because you don't have to write the code
to handle it, your OS (if vaguely modern) does it for you. The easiest
choice is UTF-8, just watch out for M$oft tools that regard the
default for "Unicode" as being UTF-16 instead (UTF-8 is there too,
just a few choices down). UTF-8Y is similar, but not the same and
probably best avoided.

Your best approach for "typical" "competent" work these days is to go
straight for UTF-8. You need tools that handle it (nearly everything
vaguely modern can) and to ruthlessly purge old config settings that
are working with ISO-8859-*. You could use either approach on its own,
it's when you try and mix them carelessly that stuff actually goes
wrong. So decide on UTF-8 as a goal, and when anything shows up that
isn't set that way, fix it to UTF-8. This applies especially if you're
international, or a multi-developer project.

Part of this requires you to configure your web server so that it
serves HTTP headers to indicate UTF-8 and definitely NOT ISO-8859-* or
an ASCII default. That's 5 minutes work with .htaccess Just do it.
Don't be scared of switching to Unicode / UTF-8, it's the easiest
choice long-term.


What about <meta http-equiv="content-type" > ? Forget it! Don't use
it! The problem is that it can indicate the encoding used, but it's
given a low priority on receiving content, so that it's always over-
ridden by the real header. It's _only_ useful if you're publishing
through CDRs etc. rather than a web server and it's all you have. Set
it by all means, just don't expect any of the browsers reading it to
pay attention.


What if you still can't get the readers' encoding to match the
creator's encoding? In that case look at entities (or else fix the
HTTP headers). Rather than entering a literal "£" character into your
document, type in a string of characters instead that represent a HTML
entity: either "&pound;" or "£"
They're listed here: http://www.w3.org/TR/html4/sgml/entities.html

The great thing about these entities is that they always refer to the
_Unicode_ characters they describe, no matter what the encoding used
in the document. If you can't switch this from ISO-8859-foo for some
reason, specify the pound character through the entity instead and
it'll be understandable by the browser, no matter what the encoding
used for the page (this is also one way to do a Norwegian-Russian
dictionary in ISO-8859-*).


Even entities don't _always_ work. Many publishing engines (blogs,
wikis, etc.) convert the entity into a literal character on saving,
which is then prone to the same encoding errors as if you'd entered it
yourself. If you're just editing HTML files directly though, this
shouldn't affect you.
 
J

Justin Time

Raymond SCHMIT said:
You have to verify your links, because under "Click on Signatures
below for Animation "the green "My signature" points to Nick Brown :)

Well spotted ....... thank you very much for letting me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top