• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

replace or remove weird chars

How can I remove or replace  a pair of weird char (looks like rectangle) in a text file in vb.net?
0
VBdotnet2005
Asked:
VBdotnet2005
  • 5
  • 3
  • 3
  • +2
1 Solution
 
carlnorrbomCommented:
Hi,

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

/Carl.
0
 
VBdotnet2005Author Commented:
How can I upload a text file for you so you can see it?
0
 
VBdotnet2005Author Commented:
there it is.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
VBdotnet2005Author Commented:
Ok I uploaded a text file called "test". So you can see it.
0
 
carlnorrbomCommented:
Hi,

I don't see any attachment?

/Carl.
0
 
Fernando SotoRetiredCommented:
Hi VBdotnet2005;

Where did you upload the file too?

Fernando
0
 
VBdotnet2005Author Commented:
I checked the box "Attach file"  and "Add file" and submit. Not sure where it upload to....
0
 
Fernando SotoRetiredCommented:
Can you try again.
0
 
JackOfPHCommented:
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
 
barrislbCommented:
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
 
carlnorrbomCommented:
Hi,
In order for us to help you it would be very helpful to actually see the file contents.
/Carl.
0
 
VBdotnet2005Author Commented:
JackOfPH, I will give it a try.... I uploaded the file a few time alreay...it is a text file
0
 
Fernando SotoRetiredCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now