Read non-UTF8 file
Stewart Gordon
smjg_1998 at yahoo.com
Fri Feb 18 18:12:08 PST 2011
On 13/02/2011 21:49, Nrgyzer wrote:
<snip>
> It compiles and works as long as the returned char-array/string of f.readLine() doesn't
> contain non-UTF8 character(s). If it contains such chars, writeln() doesn't write
> anything to the console. Is there any chance to read such files?
Please post sample input that shows the problem, and the output generated by replacing the
writeln call with
writefln("%s", cast(ubyte[]) convertToUTF8(f.readLine()));
so that we can see what it is actually reading in.
Stewart.
More information about the Digitalmars-d-learn
mailing list