473,473 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Textbox, web browser control, and Unicode (got cutoff)

The last reply got sort of cutoff. So here again:
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,
after the zoom is closed and whatever saved TO the textbox, THEN the
textbox control again is written directly as:

textbox control = fRegexp(textbox control, "<A([^\?]*) />\?", "&#$1;",
True)
And that switches everything back again to numeric entities.

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 the gobbling up of numeric entities by the activeX web browser,
off. So if it is "Ę" going in, then you can read the same
"Ę" in innerHTML when closing, assuming "Ę" itself wasn't
changed. The browser control is a cover or port to the underlying IE
API. If there were a way to disable this conversion, Microsoft might
know. But I haven't seen anything in the somewhat skimpy documentation
for the web browser control. Maybe I missed something. Maybe somebody
knows.

I was tempted to post with a title of - THE MOST BULLETPROOF PROGRAM
EVER DEVISED - or something of the sort, just to get the adversarial
types to attempt a putdown, on the assumption they might nevertheless
know something about this. I don't care if the adversary has the
answer. But there must be a better way than the above.

Nov 13 '05 #1
0 2856

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nancy | last post by:
I recently completed a web page, "Browser Tests of Entities in 2004". http://www.santagata.us/characters/CharacterEntities.html It shows those characters that work in all of the version 5.2+...
2
by: fabrice | last post by:
Hi, I have a trouble with my TextBox Control and it's ViewState in my form... The property for it, is FALSE as following : <form id="frmSearchBre4" runat="Server"> <asp:textbox id="myID"...
1
by: BluDog | last post by:
Hi I have a user control that i want to display a webpage on, this page i want to be able to toggle between the html source and the regular page view. The source of the page is in an text...
9
by: D. Shane Fowlkes | last post by:
(ASP.NET 2 / VB) Question - How can I write a If statement to see if a control (textbox) actually exists on a page? Upon page_load, a certain control may or may not be visible on the page so I...
2
by: Kiran | last post by:
Hello all, I am using a tree to display stuff, and it is constantly updated, but what I have noticed is in the lowest level, there is clearly noticable cutoff of the text I place there. The cutoff...
19
Frinavale
by: Frinavale | last post by:
Filtering user input is extremely important for web programming. If input is left unfiltered users can input malicious code that can cripple your website. This article will explain how to make...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
1
by: Duncan | last post by:
Hi all, I'm tearing my hair out on this! I have a simple ASP.NET 2 page with a TextBox control, in the PreRender I set ClientSide events:- Response.Attributes.Add("onchange",...
9
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
OK I have some Chinese text in sql server column that looks like this: 12大专题调研破解广东科学发展难题 This is unicode? Anyway, I put this data into a text area like this:...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.