Solved

replace or remove weird chars

Posted on 2009-05-11
13
207 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
Comment Utility
Hi,

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

/Carl.
0
 

Author Comment

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

Author Comment

by:VBdotnet2005
Comment Utility
there it is.
0
 

Author Comment

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

Expert Comment

by:carlnorrbom
Comment Utility
Hi,

I don't see any attachment?

/Carl.
0
 
LVL 62

Expert Comment

by:Fernando Soto
Comment Utility
Hi VBdotnet2005;

Where did you upload the file too?

Fernando
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:VBdotnet2005
Comment Utility
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
Comment Utility
Can you try again.
0
 
LVL 15

Accepted Solution

by:
JackOfPH earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now