Reading ASCII file with some codes above 127 (exten ascii)

era scarecrow rtcvb32 at yahoo.com
Thu May 24 12:47:05 PDT 2012


On Wednesday, 23 May 2012 at 21:02:27 UTC, Paul wrote:
> I wonder about the speed between this method and Era's 
> home-spun solution?

  My solution may have a flaw in it's lookup table; namely if I 
got one of the codes wrong. I used regex and a site to reference 
them all so I Hope it's right. I can't remember but I think it 
was from http://www.alanwood.net/demos/ansi.html

  The main reason I wrote it was there was no good explanations in 
the documentation of anywhere of how to use std.encoding and 
transcode. This meant I was stuck and needed some simple 
solution. I'm not sure if my solution is going to be faster, but 
it does do minimal object allocation/resizing/abstraction, and 
tries not to make a new string if it doesn't have to.

  Who knows? Perhaps it will be added to phobos once the table is 
verified.


More information about the Digitalmars-d-learn mailing list