[R-br] Problema ao ler arquivo UTF-16 com nulos

Roberto de Pinho robertodepinho em gmail.com
Quinta Novembro 1 04:41:53 BRST 2012


Tentei isto, mas limpa 00 que não devem ser limpados.

ex.

em:

09 00 00 00 09 00

Apenas o 00 00 do meio deve ser modificado.

o 09 00 é o TAB e deve ficar.

2012/10/31 Jakson Alves de Aquino <jalvesaq em gmail.com>

> 2012/10/31 Roberto de Pinho <robertodepinho em gmail.com>:
> > tbm sem sucesso:
> >
> > ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =
> > "UTF-16", as.is=T)
> > ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =
> > "UTF-16")
> > ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =
> > "UTF-16LE", as.is=T)
> > ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =
> > "UTF-16LE")
>
> Se estiver usando um sistema operacional que tenha o programa sed
> instalado (qualquer distribuição do Linux), uma tentativa pode ser
> "limpar" o arquivo, removendo os 0s:
>
> sed -e 's/\x00//g' teste.csv > teste2.csv
> sed -e 's/\xff\xfe//' teste2.csv > teste3.csv
> _______________________________________________
> R-br mailing list
> R-br em listas.c3sl.ufpr.br
> https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
> Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça
> código mínimo reproduzível.
>



-- 
Roberto de Pinho
robertodepinho em gmail.com
http://www.ascoisas.com
http://lattes.cnpq.br/4816166073408660
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20121101/b5ebe183/attachment.html>


Mais detalhes sobre a lista de discussão R-br