Re: [racket-users] reading UTF-16 from a file

2015-11-13 Thread Pierpaolo Bernardi
On Fri, Nov 13, 2015 at 9:45 AM, Tim Hanson wrote: > hi, > > I was hoping yesterday to read UTF-16 characters from a file I think you need reencode-input-port. > p.s. maybe there's an easier way to get an arbitrary counter than what i did > here? > > (define (integers-starting-from n) > (stre

[racket-users] reading UTF-16 from a file

2015-11-13 Thread Tim Hanson
hi, I was hoping yesterday to read UTF-16 characters from a file using, e.g., a small snippet such as the following: (for ([c (in-port read-char (open-input-file "myfile.txt"))] [counter naturals] #:break (>= counter 100)) (printf "(~a [~a]) " c (char->integer c))) For a UFT-16 fi