Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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