WORKAROUND Re: BUG: £ conve rted into £,   converted into ~

John Stumbles <[email protected]>
Newsgroups gmane.comp.web.amaya.general
Message-ID <[email protected]>
Benjamin Hawkes-Lewis wrote:
 > John Stumbles wrote:
 >> What puzzles me is that this looks like behaviour designed-in to
 >> Amaya, and I'm wondering what it could possibly be designed to acheive?
 >
 > My guess is economy and readability. If the character encoding you're
 > saving as supports £ then there are less bytes and the code is more
 > readable if the real character is used. (Readability is obviously an
 > unpersuasive argument when it comes to special space characters however.)

Hoookayyy, looks like my documents are in 8859-1:

?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <meta http-equiv="content-type" content="text/html; 
charset=iso-8859-1" />

If I change that to UTF-8 then Amaya replaces my &pound; with £ (I 
assume that's a representation of a UTF character which shows up in 
Amaya source view as a character like a capital A with a circumflex or 
caret ^ mark over it followed by a £ pound symbol).

That renders correctly on my browsers.

It also seems to make spacing work properly: Amaya still changes &nbsp; 
to what seems to be a real plain space, represented by '~' in source 
view, but that now renders correctly on my browsers.



(In an earlier) message Benjamin Hawkes-Lewis wrote:

> 2. Having your HTML document declare its character set with a HTTP 
> header equivalent in a META element:
> 
> http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

That's under my control


> 3. Most importantly, if the document is being served by a webserver, you 
> must ensure your server declares the character set of the HTML document 
> with a real HTTP content-type header when it serves it:
> 
> http://www.w3.org/International/O-HTTP-charset

That unfortunately is not.

Ironically it was with my own local Apache that I was getting 
incorrectly-rendered characters, and with the paid-for server it seemed 
to be displaying correctly even with ISO-8859-1 encoding.


I still think it's a bug that Amaya changes characters one has entered 
by hand without warning.

-- 
John Stumbles                                       http://yaph.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.