Home > Software engineering >  ? Hola! No existing in TXT text, read out is gibberish, how to do?
? Hola! No existing in TXT text, read out is gibberish, how to do?

Time:10-05

? Hola! No existing in text TXT read vb is garbled, how to do?

All deposits into unicode utf-8 tried
Read it out into a???? Hola! No

Online code are tried, can't,

CodePudding user response:

With application ultraedit open the file, post screenshots, take a look at what its hexadecimal data, is some kind of code, or is the code,

CodePudding user response:

Have been so in the TXT file==& gt; ? Hola! No
Read 100% in vb are garbled, because from TXT read normal Chinese characters, some vb will garbled,

Make sure to read the vb not garbled words, in the first TXT file cannot exist gibberish,

Sometimes copy text to TXT file from the web page, will appear garbled, most of the time just put the character set by utf-8 into GB2312,
Sometimes eliminated by 1 byte will increase or decrease the code...

CodePudding user response:

CodePudding user response:

Please search & gt;> Ef bb bf

CodePudding user response:

Search ef bb bf, then?

CodePudding user response:


TXT in unicode open, so the above screenshot is stored in utf-8

CodePudding user response:

Who tried code available?

CodePudding user response:

refer to 6th floor RGBCN response:

TXT in unicode open, so the above screenshots are saved into the utf-8

The look is some of the, 3 l the obvious is gibberish,

CodePudding user response:

The 3 l is preserved the utf-8 encoding

CodePudding user response:

UTF8 encoding, you obviously have discussed the results, the original poster and post:)

CodePudding user response:

The
reference 3 floor RGBCN response:


You the file is utf-8 encoding, transcoding, using VB to read, or you can change it to Unicode format

CodePudding user response:

Oh, are answered,
 
Dim adostream As New ADODB. Stream
With adostream
. Type=adTypeText
The Mode=adModeReadWrite
The Charset="utf-8"
. Open
The LoadFromFile "c: \ 22. TXT"
Text1.=ReadText 'this Text1 controls for Microsoft Forms 2.0 the TextBox inside
. Close
End With
The Set adostream=Nothing

CodePudding user response:

Coding format problem, it is recommended that the check code articles! Or reshipment system!

CodePudding user response:

Has nothing to do with the way to save, do not use type String to read it, and under the Chinese operating system, can be interpreted as text east,

Use Byte array to read, use, according to set up the correct character set RichText
  • Related