How can I read X characters from file?
Not bytes.
What classes should help me?
The difficulty is that encoding is specified.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The solution is to read 1 byte and try to convert it to character. If exception occures, read 1 more byte anc try to convert… until reading 6 bytes or success.
On success append this character to string and read next bytes.