[webkit-dev] API in webkit to convert Unicode <--> HTML named entities?

Rob Burns robburns1 at mac.com
Tue Jul 22 03:39:57 PDT 2008

On Jul 22, 2008, at 10:26 AM, Benjamin Hawkes-Lewis wrote:

> Dan Wood wrote:
>> Yeah, that's one approach but it is way overkill for many needs, and
>> invokes threads that aren't what you want for a simple function, and
>> also only go from named entity into rendered Unicode character, and
>> not the opposite (as you mention).  I want the named entities rather
>> than numbered for human-coder-readability....
> Note that for the vast majority of characters in Unicode, no named
> entities exist.

I imagine Dan is aware that the named references are a small subset of  
all Unicode characters. However, I can understand why that tiny subset  
of Unicode characters might prove useful as character references,  
making the generated source more human readable (especially for those  
characters that are part of the Unicode 'common' script).

Having said that, It seems to me this sounds like a job for HTMLTidy.  
It might make sense to approach the HTMLTidy group to implement this.  
If HTMLTidy already performed this conversion (as an option), WebKit  
could easily add a method to expose that functionality when  
serializing the DOMDocument. Considering how ubiquitous HTMLTidy is,  
that makes it an even better place for code reuse.

Take care,

More information about the webkit-dev mailing list