Read a file character by character/UTF8

From Rosetta Code
Revision as of 09:36, 17 March 2013 by rosettacode>Markhobley (initial draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Read a file character by character/UTF8 is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Read a file one line at a time, as opposed to reading the entire file at once.

The solution may be implemented as a stateful procedure, which returns the next character in the file on each consecutive call (returning EOF when the end of the file is reached).

The procedure should support the reading of files containing Unicode wide characters, returning whole characters for each consecutive read.

See also: Read a file line by line.