>How does one display unicode in a web browser control using the
>numeric entities in HTML - e.g. Θ or έ etc - and be able to
>read out either innertext or innerhtml without the control converting
>all the numeric entities to a question mark, but just leaving them as
>the original character string, the numeric entity?
So for anyone interested, here's the simple regexp patterns for the
substitutions required.
The textbox control is being 'zoomed' in a popup which uses a web
browser control. As soon as any numeric entity gets put into the
browser control, it's lost. It will display properly. But it can't be
then read back out with document.body.innerHTML (or outerHTML). It's
just gone.
So just before the zoom popup is . . popped up, one modifies the text
in the textbox control, itself.
textbox control = fRegexp(textbox control, "&#([^;]*);",
"<A$1/>&#$1;", True)
where fRegexp is some code you place in a module as cover to the WSH
or whatever regexp function.
Public Function fRegExp(ByVal strFull As String, strPattern As String,
strReplace As String, boolGlobal As Boolean)
Dim regexp1 As New regexp
regexp1.Pattern = strPattern
regexp1.Global = boolGlobal
fRegExp = regexp1.replace(strFull, strReplace)
End Function
And when it comes time to close the popup, and save the final result,
the textbox control again is written directly as:
textbox control = fRegexp(textbox control, "<A([^\?]*) />\?", "&#$1;",
True)
But, once again, the problem is that this keeps any Unicode editing
out of the zoom box. And it would seem to me it might be convenient to
cut n paste from some charmap-type app those Unicode values directly
into the zoom, rather than the underlying textbox after the zoom is
closed. I guess the fix, there, would be to add a button to the zoom
box button bar (assuming one uses such a custom bar), to insertHTML
for each Unicode value, with the dummy "<a . . />" elements and all,
so that these too would be included in the closing call to fRegexp.
But - that is - there must be a better way. Ideally, one could simply
turn