Re: [q-lang-users] More Unicode queries.
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-01-16 09:45:53
|
John Cowan wrote: > In particular, the W3C has just released a draft set of unified > character entities from XHTML, MathML, and the ISO sets: see the draft at > http://www.w3.org/TR/2007/WD-xml-entity-names-20071214/ and the unified > list at http://www.w3.org/2003/entities/2007/w3centities-f.ent . Ok, this is in cvs now. I also made available a tarball (snapshot of current cvs) in testing: http://sourceforge.net/project/showfiles.php?group_id=96881&package_id=188958 Here's the blurb from the manual: As of version 7.11 and later, the interpreter also supports symbolic character escapes of the form `\&NAME;', where NAME is any of the XML single character entity names specified in the "XML Entity definitions for Characters", see `http://www.w3.org/TR/xml-entity-names/'. Note that, at the time of this writing, this is still a W3C working draft, so the supported entity names may be subject to change until the final specification comes out; the currently supported entities are described in the draft from 14 December 2007, see `http://www.w3.org/TR/2007/WD-xml-entity-names-20071214/'. Also note that multi-character entities are _not_ supported in this implementation. Examples (make sure you set your email client to UTF-8 encoding if this comes out garbled): ==> "Gr\äf" "Gräf" ==> "Gr\&junk;f" ! Invalid character escape in string constant >>> "Gr\&junk;f" ^ ==> puts "The greek letter \&phgr; is the 21st letter in the Greek alphabet.\n" The greek letter φ is the 21st letter in the Greek alphabet. () Enjoy, and please let me know if there's anything that doesn't appear to work right. Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |