Home > Back-end >  Delphi's memo. Loadfromfile problem
Delphi's memo. Loadfromfile problem

Time:10-30

Program has a memo when loadfromfile, the load is a TXT file, before many of the TXT can be read from a memo, but there is a TXT, memo when loadfromfile, found that after the load, the characters in the memo is' ', that is empty, no load is successful, I talk about here, the TXT is a test machine (blood test) of the original data, then copy in my computer, I don't know where is the problem, the sense that gives a person is this TXT is a problem with the original data, but kao before a lot of testing machine of the original data, TXT, memo can through loadfromfile method complete access to the inside of the characters, this text documents original data also didn't see any strange,
I then through
Assignfile (f, srfile);
Reset (f);
While not eof (f) do
The begin
Readln (f, s_read);
S_wcl:=s_wcl + s_read;
end;
The statement tries to read, read,
Srfile is the directory, TXT read after the characters are assigned to the s_wcl;
But then a strange problem,
The TXT inside there is a character "?" That question mark, but, when I am through the method of pos ("?" S_wcl), found that pos value is 0, that is not found have this character, but this TXT, indeed is this character, namely the question mark is some,
Which a great god help the younger brother to solve the problem

CodePudding user response:

His hat with the first

CodePudding user response:

Estimation is a problem of coding (utf, unicode)

CodePudding user response:

Other characters can be read by pos methods

CodePudding user response:

TXT inside there is a character "?" , it is estimated that only the code, rather than a true question mark

CodePudding user response:

Coding issues, with MadEdit open look,

CodePudding user response:

Are you sure that is true "??"

CodePudding user response:

Yes, really? "" Because I put it CTRL + c to a program that will be converted to ASCII characters, the converted according to its ASCII code is 63, is a question mark of ASCII,

CodePudding user response:

refer to 7th floor sagazheng response:
yes, really? "" Because I put it CTRL + c to a program that will be converted to ASCII characters, the converted according to its ASCII code is 63, is a question mark in the ASCII,


Way of using hexadecimal view content, is the most clear
Copying does not necessarily accurate original byte value

CodePudding user response:

What use that software to check

CodePudding user response:

Application UltraEdit

CodePudding user response:

Coding issues
See in TXT is? , copying out too? Actually saved value is not necessarily in TXT? The value of the

Copy a traditional characters to Delphi, for example, the saw is probably?

CodePudding user response:

Then why do I ask the upstairs, I will print out the "?" , to convert characters to the ASCII code of the software, after conversion, the characters of the ASCII code is 63, this is a question mark ASCII,

CodePudding user response:

references 9 f sagazheng response:
that use what software to see


Powerful editor, such as application ultraedit or powerful system of tools, such as total commander
  • Related