help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: csv read problem


From: Marco Atzeri
Subject: Re: csv read problem
Date: Thu, 18 Feb 2016 19:49:15 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 18/02/2016 18:31, Dave Cottingham wrote:
I sounds like this file is in a multi-byte unicode charset, e.g. utf-16 or
ucs-2, in which case you could solve your problem by translating it to
something octave can read, like utf-8.

Most linux distros come with the iconv utility. You could try experimenting
with something like

iconv -f utf-16 -t utf-8 <bad.csv >good.csv

and see if it works better.



On my iconv the coding is called
  CP1200 UCS-2LE UCS2LE UNICODELITTLE

$ iconv -f CP1200 -t utf-8 <bad.csv >good.csv

$ head good.csv
IdProvincia;IdEstacion;Fecha;AƱo;Dia;PrecipitaciĆ³n (mm)
3;2;01/01/2000;2000;1;0
3;2;02/01/2000;2000;2;0
3;2;03/01/2000;2000;3;0
3;2;04/01/2000;2000;4;0,2
3;2;05/01/2000;2000;5;0,2
3;2;06/01/2000;2000;6;0,2
3;2;07/01/2000;2000;7;0
3;2;08/01/2000;2000;8;0
3;2;09/01/2000;2000;9;0

Moreover the line termination is CR LF.

Regards
Marco



reply via email to

[Prev in Thread] Current Thread [Next in Thread]