By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

ascii text

P: n/a
Hi all, I have a very strange problem with a text file. I have write some
lines as ascii text from my vb application to a text file. If I open the
text file it looks like normal text but if I read it some caracters became
strange (ascii text). I want to convert this file in normal text, I tried
ctype, cstr, tostring, directcast without success. I have also read the file
line by line, ctype the line, put the lines in an array, delete the file,
create a new one and write the array, no luck :(
Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dim SourceText As String
Dim DestText As String
Dim unicodeEncoder As New System.Text.UnicodeEncoding

DestText =
unicodeEncoder.GetString(unicodeEncoder.Convert(un icodeEncoder.ASCII,
unicodeEncoder.Unicode, unicodeEncoder.GetBytes(SourceText)))

poldoj wrote:
Hi all, I have a very strange problem with a text file. I have write some
lines as ascii text from my vb application to a text file. If I open the
text file it looks like normal text but if I read it some caracters became
strange (ascii text). I want to convert this file in normal text, I tried
ctype, cstr, tostring, directcast without success. I have also read the file
line by line, ctype the line, put the lines in an array, delete the file,
create a new one and write the array, no luck :(
Thanks


--

Best,
_____________
Bharat Sharma

* TEN Technologies.
* Official Web: _www.ten-technologies.com_
<http://www.ten-technologies.comemail/>
Personal Web: _www.bharatsharma.net_ <http://www.bharatsharma.net/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.