Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / February 2005

Tip: Looking for answers? Try searching our database.

Web browser control and Unicode

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Johnson - 10 Feb 2005 21:28 GMT
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?
Mark Johnson - 11 Feb 2005 10:54 GMT
>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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.