I've been looking for an API to convert from a unicode character to its named HTML entity (like "€" or "ä") -- if it exists -- and vice-versa.

This appears to be a pretty common need; from what I can tell there is some kind of home-baked solution used in:

* Sandvox from Karelia (my App)
* Coda from Panic
* UnicodeChecker from EarthlingSoft
* Flow from Extendamac
* apps from ConnectedFlow
(just the apps that I've been able to notice)


I've scanned the WebKit sources, and it looks like the logic for doing this conversion is embedded somewhere in HTMLTokenizer, which uses some generated lookups from the file HTMLEntityNames.gperf".


Is there an API that I'm not finding, so that a Cocoa application that links to WebKit can do a low-level conversion in either direction?

If not, is there a hack that somebody can suggest? (And I'm going to request that this be exposed as an API....)


--
Dan Wood
Karelia Software — Sandvox for the Mac
http://www.karelia.com/

It is the habit of every aggressor nation to claim that it is acting on the defensive. — Jawaharlal Nehru


_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to