473,387 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

removing non traditional text

This is really weird.

I have provided to a client a means for which they can store text in a
database and insert into a word document.

Originally they entered the text into a textbox. However when they copied
and pasted text in there apparently formatting symbols came over as well but
they were not visible. So when they searched for this text in the document
after inserting it the "find" function didnt work.

So I came up with the idea of putting it in a rich textbox. This for the
most preserved the formatting in a visible form. They entered it into the
database. Then they would open it in a regular textbox and remove all I can
call appear to be style markings of some kind (a square in shape).

I am wondering if there is a way to automate the removal of this unorthodox
text.

Thank you all for your help!!
Nov 20 '05 #1
13 1273
Hi Scorp,

Is it always that symbol and does it always appear as the first character?
If either is true, you could look for it on the update to the row in sql and
weed it out, looking for that particular ascii equivalent (sounds like ascii
254 ?).

HTH,

Bernie Yaeger

"scorpion53061" <Its the end of the world as we know it@here.com> wrote in
message news:u%****************@TK2MSFTNGP09.phx.gbl...
This is really weird.

I have provided to a client a means for which they can store text in a
database and insert into a word document.

Originally they entered the text into a textbox. However when they copied
and pasted text in there apparently formatting symbols came over as well but they were not visible. So when they searched for this text in the document
after inserting it the "find" function didnt work.

So I came up with the idea of putting it in a rich textbox. This for the
most preserved the formatting in a visible form. They entered it into the
database. Then they would open it in a regular textbox and remove all I can call appear to be style markings of some kind (a square in shape).

I am wondering if there is a way to automate the removal of this unorthodox text.

Thank you all for your help!!

Nov 20 '05 #2
> Is it always that symbol and does it always appear as the first character?

Hi Berine

It is this synbol I have attached in a text file. For some reason I cannot
paste it here.

It seems to occur whenever a format change occurs in the text or a break in
the text occurs.

When I try to do a Trim statement in visual studio when I click paste it is
invisible and breaks to the next line.

Is anything able to handle this character?


Nov 20 '05 #3
Hi Scorp,

It's weird all right. I remember - a long time ago - converting data from a
Borland Paradox system (I told you it was long ago!) to a foxpro system and
I ran into the same character. It's something like an end of line
character, because you can't get behind it, except with one of itself, and I
was able to rip it out, but I don't recall how I did it. I may have parsed
the line and disallowed anything that wasn't alphanumeric or chr(10) and
chr(13) and dashes, etc, but I honestly do not recall.

Sorry I couldn't be of more help.

Bernie

"scorpion53061" <Its the end of the world as we know it@here.com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
Is it always that symbol and does it always appear as the first
character?
Hi Berine

It is this synbol I have attached in a text file. For some reason I cannot
paste it here.

It seems to occur whenever a format change occurs in the text or a break in the text occurs.

When I try to do a Trim statement in visual studio when I click paste it is invisible and breaks to the next line.

Is anything able to handle this character?


Nov 20 '05 #4
It's something like an end of line
character, because you can't get behind it, except with one of itself, and I was able to rip it out, but I don't recall how I did it.


Bernie,
Thanks for trying. I am hoping someone else has ideas.
Nov 20 '05 #5
see this link
http://personalwebs.oakland.edu/~gro...cii.codes.html

it seems to post ASCII codes for characters that look like mine.

How would I code tell it to remove all ASCII codes that I choose from this
page
Nov 20 '05 #6
Hi Scorp,

I looked at the page you refer to. It's odd but when I try to create
characters with the codes represented there, I get different characters.

In any case, here's an example of parsing a string to remove certain
characters. This example removes Z (chr(90)) from anywhere in the string in
a textbox and places the result into another textbox. I used the first
string's leave event for this, but any event will do.
glf_parsedstring = rawstring.Text

Dim i As Integer

For i = 1 To glf_parsedstring.length

If InStr(Mid(glf_parsedstring, 1, i), Chr(90)) Then

glf_parsedstring = Mid(glf_parsedstring, 1, i - 1) & Mid(glf_parsedstring, i
+ 1)

End If

i += 1

Next

parsedstring.Text = glf_parsedstring

HTH,

Bernie

"scorpion53061" <Its the end of the world as we know it@here.com> wrote in
message news:Os**************@TK2MSFTNGP09.phx.gbl...
see this link
http://personalwebs.oakland.edu/~gro...cii.codes.html

it seems to post ASCII codes for characters that look like mine.

How would I code tell it to remove all ASCII codes that I choose from this
page

Nov 20 '05 #7
when they copied
and pasted text in there apparently formatting symbols came over as well but they were not visible. So when they searched for this text in the document
after inserting it the "find" function didnt work.


I have solved this issue. There is no need to respond to this thread.
Nov 20 '05 #8
Hi Scorp,

Just curious - how'd you solve it?

Bernie

"scorpion53061" <Its the end of the world as we know it@here.com> wrote in
message news:%2***************@TK2MSFTNGP12.phx.gbl...
when they copied
and pasted text in there apparently formatting symbols came over as well

but
they were not visible. So when they searched for this text in the document after inserting it the "find" function didnt work.


I have solved this issue. There is no need to respond to this thread.

Nov 20 '05 #9
> Just curious - how'd you solve it?

You are not going to believe this........

TextBox4.Text = Replace(RichTextBox1.Text, Chr(10), "")

I cannot believe I struggled so hard with this.
Nov 20 '05 #10
Cor
Still that strange CSV file without a "CR" Scorpion, I never heard if you
did succeed with that sample I have made.

I made it in C# also and thouhgt sending it when you was asking that
question in the C# newsgroup, but did not.

:-))

Cor

TextBox4.Text = Replace(RichTextBox1.Text, Chr(10), "")

Nov 20 '05 #11
> Still that strange CSV file without a "CR" Scorpion, I never heard if you
did succeed with that sample I have made.


Could you remind me of the sample of which you speak?

The dataset to array to MS Word table code is still not working. I am
getting HResults errors all over the place.

I am SO frustrated by this.

Have you ever done this before?
Nov 20 '05 #12
Cor
Hi Scorpion,

I see this now, I thought Cindy, me and others where talking about Excel all
the time, paste here in and example of the resultfile you want, than I can
look to it, but no interop with Word, that I did not do a long time, just a
kind of txt format.

Or if you want I can make it in HTML as a table, that is no problem for me
at all and that you can read in Word as a table.

Cor

Could you remind me of the sample of which you speak?

The dataset to array to MS Word table code is still not working. I am
getting HResults errors all over the place.

I am SO frustrated by this.

Have you ever done this before?

Nov 20 '05 #13
Hi Cor,

Right it was a Word table.

We are trying to use the Word automation object model to write an array
(created from a dataset) to a word table.

I can write it cell by cell but it is painfully slow.

I can also write it via a html within the vb.net app but I have found it
difficult to make a professional looking report this way.
"Cor" <no*@non.com> wrote in message
news:e3*************@TK2MSFTNGP12.phx.gbl...
Hi Scorpion,

I see this now, I thought Cindy, me and others where talking about Excel all the time, paste here in and example of the resultfile you want, than I can look to it, but no interop with Word, that I did not do a long time, just a kind of txt format.

Or if you want I can make it in HTML as a table, that is no problem for me
at all and that you can read in Word as a table.

Cor

Could you remind me of the sample of which you speak?

The dataset to array to MS Word table code is still not working. I am
getting HResults errors all over the place.

I am SO frustrated by this.

Have you ever done this before?


Nov 20 '05 #14

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

Similar topics

1
by: bjwang | last post by:
Hello wisers, We are testing a system which is developed on top of Oracle 9iAS. The client PCs are using Internet Explorer to access the system. We are sure that the Oracle 9i database server is...
2
by: vbAlex | last post by:
I've tried everything, looked through all the faqs and everything, looking for a way to remove the 1px dotted border from around active links... tried a:active { border: 0px solid black; } ...
5
by: Robert J. O'Hara | last post by:
For some time I've struggled with the problem of displaying simple captioned figures on webpages in a way that is robust and scalable. I tend to make "boring" (um, I mean "conservatively elegant")...
11
by: rajarao | last post by:
hi I want to remove the content embedded in <script> and </script> tags submitted via text box. My java script should remove the content embedded between <script> and </script> tag. my current...
2
by: Raja Kannan | last post by:
Is there a way to remove text portion from the HTML keeping the HTML Tags using the browser, say javascript RegEx or something ? I have seen lot of examples removing HTML tags to get the text...
20
by: Rubinho | last post by:
I've a list with duplicate members and I need to make each entry unique. I've come up with two ways of doing it and I'd like some input on what would be considered more pythonic (or at least...
0
by: sameer mowade via .NET 247 | last post by:
Hello All, I have problem while dynamically removing row from the Datagrid which i have added dynamically as shown in the following code snippet. The problem is that while removing dynamically...
3
by: Chris Murphy via DotNetMonster.com | last post by:
I'm curious to know if C++.NET produced a smaller & faster (performance wise) executeable. I don't know too much about C++ and I'm only starting to pick it up now, but given that I'm doing a lot of...
6
by: bruce | last post by:
hi... i'm running into a problem where i'm seeing non-ascii chars in the parsing i'm doing. in looking through various docs, i can't find functions to remove/restrict strings to valid ascii...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.