reading multibyte characters

V

Vladimir Agafonkin

To read, for example, 20 bytes from a file, I can use the following
code:

block = input_file.read( 20 )

How can I do the same with multibyte characters instead of bytes? E.g.
I have a UTF8-encoded file, and want to read exactly 20 characters from
it, do something with them, then read another 20 character etc. Is it
possible?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top