On Sat, Nov 19, 2011 at 06:19:59PM -0800, Francois Stephany wrote:
Hi,
Reading an utf8 file with OSProcess results in some weird characters showing up.
(PipeableOSProcess command: 'less /path/to/a/text/file') output. -> inspect the bytestring and get some non-ascii characters fucked up.
Doing `less /path/to/a/text/file` in a terminal displays the file fine.
That's probably something stupid on my side but I cannot get it working. Any idea ?
Francois, The output of the PipeableOSProcess is based on a StandardFileStream rather than a MultiByteFileStream, so it may not do what you expect with a file containing non-ascii characters. Note that the unix /usr/bin/less utility is intended for interactive use with a terminal. You probably should use /usr/bin/cat instead. HTH, Dave