KingSencat
asked on
How to convert a .txt to ascii using Visual Basic v6.0
I have a .txt file which contains non-ascii code like, Y!÷äÝs P!÷äÕY 6!÷äÎi ,!÷ä¸ !÷ä²s !÷ä©y !÷ä¦$
How do i remove all the strange characters from the .txt and remain the normal ones ? Please help
How do i remove all the strange characters from the .txt and remain the normal ones ? Please help
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
1. http://www.devasp.net/net/articles/display/622.html
2.
Imports System.Text
Imports System.IO
Public Class Tester
Public Shared Sub Main
Dim strSource As String
Dim bteEndode() As Byte
Dim myFileStream As New FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite)
strSource = "asdf"
bteEndode = Encoding.ASCII.GetBytes(st
myFileStream.Write(bteEndo
myFileStream.Close()
End Sub
End Class
3. http://www.vb-helper.com/howto_binary_to_text.html