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,