Re: Read non-UTF8 file

2011-02-22 Thread Nrgyzer
== Auszug aus Stewart Gordon (smjg_1...@yahoo.com)'s Artikel > What compiler version/platform are you using? I had to fix some errors > before it would > compile on mine (1.066/2.051 Windows). > On 19/02/2011 13:42, Nrgyzer wrote: > > > Now... and with writefln("%s", cast(ubyte[]) convertToUTF8(

Re: Read non-UTF8 file

2011-02-21 Thread Stewart Gordon
What compiler version/platform are you using? I had to fix some errors before it would compile on mine (1.066/2.051 Windows). On 19/02/2011 13:42, Nrgyzer wrote: Now... and with writefln("%s", cast(ubyte[]) convertToUTF8(f.readLine())); I get the following: [195, 131, 164] [195, 131, 182] [

Re: Read non-UTF8 file

2011-02-20 Thread Nrgyzer
== Auszug aus spir (denis.s...@gmail.com)'s Artikel > On 02/19/2011 02:42 PM, Nrgyzer wrote: > > == Auszug aus Stewart Gordon (smjg_1...@yahoo.com)'s Artikel > >> On 13/02/2011 21:49, Nrgyzer wrote: > >> > >>> It compiles and works as long as the returned char-array/string of f.readLine() doesn't

Re: Read non-UTF8 file

2011-02-19 Thread spir
On 02/19/2011 02:42 PM, Nrgyzer wrote: == Auszug aus Stewart Gordon (smjg_1...@yahoo.com)'s Artikel On 13/02/2011 21:49, Nrgyzer wrote: 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() d

Re: Read non-UTF8 file

2011-02-19 Thread Nrgyzer
== Auszug aus Stewart Gordon (smjg_1...@yahoo.com)'s Artikel > On 13/02/2011 21:49, Nrgyzer wrote: > > > 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 > > anyth

Re: Read non-UTF8 file

2011-02-18 Thread Stewart Gordon
On 13/02/2011 21:49, Nrgyzer wrote: 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 in

Read non-UTF8 file

2011-02-13 Thread Nrgyzer
Hey guys, I've the following source: module filereader; import std.file; import std.stdio : writeln; void main(string[] args) { File f = new File("myFile.ext", FileMode.In); while(!f.eof()) { writeln(convertToUTF8(f.readLine())); } f.close(); } s