|
Posted by Richard on 07/18/07 03:13
This is re-posted from http://groups.google.com/group/JavaScript-Information,
under the (poor) Subject "Script translated". It should have been
posted here in the first place.
I visited http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html,
which provides a neat tutorial about metaclasses in Ruby programming.
I particularly like the GUI the author created and want to emulate his
techniques. In particular, he used the (three character) string ’
(hex E2 80 99) which translated in ' (ASCII apostrophe) in both
Firefox 2 and HTML-Kit HTML-Kit Version 1.0 (Build 292). However, IE7
leaves it untranslated.
I presume the author coded the apostrophe this way was for
internationalization. But I don't see why this works in Firefox and
HTML-Kit. Can anyone explain why the following works in those two
browsers?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Apostrophy Test.html</title>
</head>
<body>
<p>If you’re new to metaprogramming in Ruby</p>
</body
</html>
Navigation:
[Reply to this message]
|