W3C home > Mailing lists > Public > www-svg@w3.org > September 2008

Re: Displaying chinese ideographs in svg page with Javascript and unicode

From: David Woolley <forums@david-woolley.me.uk>
Date: Mon, 15 Sep 2008 08:19:03 +0100
Message-ID: <48CE0C67.5050701@david-woolley.me.uk>
To: www-svg@w3.org

Fulio Pen wrote:

> 
> Open these files online, you will see the html one is not rendered on 
> all IE, FF and Opera browsers.  The svg page is not rendered on IE and 
> FF, and poorly on Opera.  In short, the svg does not render Chinese 
> characters independently online. 

IE does not support SVG, so any test of SVG on IE is actually a test of 
some third party plugin.  The most commonly used plugin is no longer 
supported.

Generally, though this list should be about things that can't be 
implemented or where the specification is not clear enough, rather than 
simply about how to work round bugs in implementations.

Note that your "HTML" is invalid.  It claims to use the XHTML 1.0 
transitional DTD, but that has no embed element.  embed is a proprietary 
extension.  It is often used for SVG examples because object is badly 
implemented.

Also, it is being served in Appendix C mode, which means it should be 
treated as lexically invalid HTML, not as XHTML.  It is also being 
served without a charset in the HTTP headers and without a 
meta...content-type element, so its character set is indeterminate (it 
would only be UTF-8 if served as XHTML (application xml+xhtml)).

HTTP/1.1 200 OK
Date: Mon, 15 Sep 2008 06:58:43 GMT
Server: Apache
Last-Modified: Sun, 14 Sep 2008 18:17:52 GMT
ETag: "fe1003c-1cc-2303f400"
Accept-Ranges: bytes
Content-Length: 460
Connection: close
Content-Type: text/html

The SVG is also being served with an HTML content type, so really should 
  be treated as gibberish.  Any browser interpreting it as SVG is really 
going beyond its terms of reference.  As you are in undefined territory, 
it is anyone's guess as to what character set would be used.

HTTP/1.1 200 OK
Date: Mon, 15 Sep 2008 07:01:39 GMT
Server: Apache
Last-Modified: Sun, 14 Sep 2008 18:18:06 GMT
ETag: "fe1008a-f02-23d99380"
Accept-Ranges: bytes
Content-Length: 3842
Connection: close
Content-Type: text/html

There is, currently, discussion about the use of SVG inline in real 
HTML, but that would be HTML without spurious "/"s, and your SVG is out 
of line.

Regardless of the above, my Firefox 2.0.0.16, on Linux, does display the 月.

-- 
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.
Received on Monday, 15 September 2008 07:19:40 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:40 GMT