Solved

replace or remove weird chars

Posted on 2009-05-11
13
209 Views
Last Modified: 2012-05-06
How can I remove or replace  a pair of weird char (looks like rectangle) in a text file in vb.net?
0
Comment
Question by:VBdotnet2005
  • 5
  • 3
  • 3
  • +2
13 Comments
 
LVL 18

Expert Comment

by:carlnorrbom
ID: 24356067
Hi,

You can use String.Replace("weirdcharacter", "")

/Carl.
0
 

Author Comment

by:VBdotnet2005
ID: 24356140
How can I upload a text file for you so you can see it?
0
 

Author Comment

by:VBdotnet2005
ID: 24356149
there it is.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:VBdotnet2005
ID: 24356151
Ok I uploaded a text file called "test". So you can see it.
0
 
LVL 18

Expert Comment

by:carlnorrbom
ID: 24356406
Hi,

I don't see any attachment?

/Carl.
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 24356412
Hi VBdotnet2005;

Where did you upload the file too?

Fernando
0
 

Author Comment

by:VBdotnet2005
ID: 24356472
I checked the box "Attach file"  and "Add file" and submit. Not sure where it upload to....
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 24356722
Can you try again.
0
 
LVL 15

Accepted Solution

by:
JackOfPH earned 500 total points
ID: 24360569
I believe the weird characters is caused by the carriage return in the textfile.
To remove it, try this code:

Textbox1.text = YourStringVariable.Replace(vbcrlf," ")

Open in new window

0
 
LVL 4

Expert Comment

by:barrislb
ID: 24364898
Hi VBdotnet2005,

Those weird rectangle boxes are replacements for the white space " " character. The file probably could not recognize a certain font. Still waiting to see your file.
0
 
LVL 18

Expert Comment

by:carlnorrbom
ID: 24372085
Hi,
In order for us to help you it would be very helpful to actually see the file contents.
/Carl.
0
 

Author Comment

by:VBdotnet2005
ID: 24401252
JackOfPH, I will give it a try.... I uploaded the file a few time alreay...it is a text file
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 24402404
To upload a text file for this question click on the check box near the bottom of this page called "Attach File".  In the new box click on the button called "Add File". This will open a "Choose File To Upload" dialog box, locate the file you wish to upload and then click on the button "Open". Once the file has been successfully selected write a description of the file in the "Description text box. Then click on button "Submit" to send the post.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question