[webkit-dev] API in webkit to convert Unicode <--> HTML named entities?
dw43031apple at karelia.com
Mon Jul 21 11:15:21 PDT 2008
I've been looking for an API to convert from a unicode character to
its named HTML entity (like "€" or "ä") -- if it exists --
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....)
Karelia Software — Sandvox for the Mac
It is the habit of every aggressor nation to claim that it is acting
on the defensive. — Jawaharlal Nehru
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev