You are here: Re: String "’" translated to apostrophe. Why? « HTML « IT news, forums, messages
Re: String "’" translated to apostrophe. Why?

Posted by Jukka K. Korpela on 07/19/07 16:59

Scripsit Richard:

> In this case, do you think the author should have used something other
> than UTF-8 because his page was pure ASCII,

He could have used US-ASCII, ISO-8859-1, or even windows-1252. Now that
support to UTF-8 in web browsers is rather universal, it doesn't matter much
that you declare it even in cases where your data is really ASCII. On the
other hand, declaring UTF-8 even if you really use ASCII used to help
Netscape 4 into doing the right thing with entity references. But that's
past winter's snow now. What remains is that people who read the source code
get puzzled with the declaration of UTF-8.

> save for the HTML entity?

The entity reference doesn't make the data non-ASCII: it consists of ASCII
characters that represent, by a special convention, a particular character.

> Or do you think the author should have employed other
> features supported by UTF-8?

I'm not saying he _should_, just that it puzzles me why he didn't. (I can
imagine some reasons, like editors that cannot handle real UTF-8.) If your
authoring software supports UTF-8, wouldn't you want to see a real
apostrophe instead of a cryptic reference like ’ when you read the
source code?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация