View Single Post
Old 04-02-2008, 02:27 AM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by jgray View Post
This issue of quotes, mdashes and such turning into strange characters is why I use the numeric representations in my HTML markup. For example, for a left-double-curly-quote, & # 8220 ; and & # 8221 ; for the right. This is the only way to guarantee that non-ASCII characters will display properly on different systems.

This is especially true with XHTML, as the only such characters defined by name are & lt ;, & gt ; & amp ; (I think there are a few more, I just don't remember them right now). Not even the & nbsp ; is defined for XHTML.

Note that I had to insert spaces on each of those tags. The BBS software shows the character and not the tag that I entered, even if I wrap them in CODE tags.
Actually using numeric entities doesn't guarantee anything. After all you have to adopt some convention for how to decode the numbers into characters. I've seen HTML files that use the convention that the character encoding for the numeric entities is the same as that declared in the meta charset tag.
kovidgoyal is offline   Reply With Quote