Caro Daniel, <div><br></div><div>A sua importação deixa escapar o restante dos dados da primeira linha, por exemplo. </div><div><br></div><div>Há valores não nulos que foram não lidos pois, como disse na mensagem original:</div>
<div><br></div><div>"<span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">No entanto, ele reconhece prematuramente fins de linhas em algumas linhas quando encontra campos com nulo [00 00]. Há valores não nulos não sendo lidos após campos nulos que provocam o reconhecimento de fim de linha".</span></div>
<div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">No "resto"da primeira linha ainda há:</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255)"><font color="#222222" face="arial, sans-serif">6271<span class="Apple-tab-span" style="white-space:pre">        </span>FUNDACAO UNIVERSIDADE DE BRASILIA<span class="Apple-tab-span" style="white-space:pre">   </span>15000<span class="Apple-tab-span" style="white-space:pre">       </span>MINISTERIO DA EDUCACAO<span class="Apple-tab-span" style="white-space:pre">      </span>HOSP-HOSPITAL UNIVERSITARIO DE BRASILIA<span class="Apple-tab-span" style="white-space:pre">     </span>26271<span class="Apple-tab-span" style="white-space:pre">       </span>FUNDACAO UNIVERSIDADE DE BRASILIA<span class="Apple-tab-span" style="white-space:pre">   </span>15000<span class="Apple-tab-span" style="white-space:pre">       </span>MINISTERIO DA EDUCACAO<span class="Apple-tab-span" style="white-space:pre">      </span>3<span class="Apple-tab-span" style="white-space:pre">   </span>SEM VINCULO<span class="Apple-tab-span" style="white-space:pre"> </span></font></span></div>
<div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">Não informada<span class="Apple-tab-span" style="white-space:pre">   </span>Não informada<span class="Apple-tab-span" style="white-space:pre">       </span>RESIDENCIA MULTIPROFISSIONAL<span class="Apple-tab-span" style="white-space:pre">        </span>40 HORAS SEMANAIS<span class="Apple-tab-span" style="white-space:pre">   </span></span></div>
<div><br></div><div>Que não está sendo lido e ignorado por conta do fill = T.</div><div><br></div><div><br></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">====</span></div>
<div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Resolvi fazendo um programa em C que tira os nulos e substitui por espaços (abaixo).</span></div>
<div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Com isto, o arquivo é lido mesmo sem o fill:</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div>
<br></div><div>url = "~/Downloads/teste2.csv"</div><div>y = read.table(url, header = T, sep="\t",quote="",stringsAsFactors=T,fileEncoding="UTF-16", fill=F)</div></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div>
<br></div></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Bem, obrigado pela ajuda, mas pena que não resolvi no R.</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">=======</span></div>
<div>







<p class="p1">#include <span class="s1"><stdio.h></span></p>
<p class="p2"><span class="s2">#include </span><stdlib.h></p>
<p class="p3"><br></p>
<p class="p3"><br></p>
<p class="p4"><span class="s3">int</span> main(<span class="s3">int</span> argc, <span class="s3">const</span> <span class="s3">char</span> * argv[])</p>
<p class="p4">{</p>
<p class="p3"><br></p>
<p class="p3">    </p>
<p class="p4">    <span class="s4">FILE</span> * inFile;</p>
<p class="p4">    <span class="s4">FILE</span> * outFile;</p>
<p class="p2"><span class="s5">    inFile = </span><span class="s6">fopen</span><span class="s5">(</span>"/Users/robertopinho/Downloads/teste.csv"<span class="s5">, </span>"rb"<span class="s5">);</span></p>

<p class="p2"><span class="s5">    outFile = </span><span class="s6">fopen</span><span class="s5">(</span>"/Users/robertopinho/Downloads/teste2.csv"<span class="s5">, </span>"wb"<span class="s5">);</span></p>

<p class="p3">    </p>
<p class="p4">    <span class="s3">while</span>(!<span class="s6">feof</span>(inFile)){</p>
<p class="p4">        <span class="s3">char</span> c1;</p>
<p class="p4">        <span class="s3">char</span> c2;</p>
<p class="p4">        c1 = <span class="s6">fgetc</span>(inFile);</p>
<p class="p4">        c2 = <span class="s6">fgetc</span>(inFile);</p>
<p class="p4">        <span class="s3">if</span>(c1 == (<span class="s3">int</span>)<span class="s3">NULL</span> && c2 == (<span class="s3">int</span>)<span class="s3">NULL</span>){</p>
<p class="p4">            c1=<span class="s7">0x20</span>;</p>
<p class="p4">        }</p>
<p class="p4">        <span class="s6">fputc</span>(c1,outFile);</p>
<p class="p4">        <span class="s6">fputc</span>(c2,outFile);</p>
<p class="p3">        </p>
<p class="p4">    }</p>
<p class="p3">        </p>
<p class="p3">    </p>
<p class="p4">    <span class="s6">fclose</span>(outFile);</p>
<p class="p4">    <span class="s6">fclose</span>(inFile);</p>
<p class="p3"><br></p>
<p class="p4">    <span class="s3">return</span> <span class="s7">0</span>;</p>
<p class="p4">}</p>
<p class="p3"><br></p></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><br><div class="gmail_quote">2012/11/1 Daniel Marcelino <span dir="ltr"><<a href="mailto:dmsilva.br@gmail.com" target="_blank">dmsilva.br@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><font face="arial, sans-serif">Tenta baixar os dados e importar do computador. É quase 1 gb de texto. É praticamente impossível não ter nenhum erro de codificação. </font></div>
<div><font face="arial, sans-serif">Eu fiz assim e deu certo de novo com o arquivo </font><span style="font-family:arial,sans-serif;font-size:13px">"</span><span style="font-family:arial,sans-serif;font-size:13px">20120930_Servidores.csv":</span></div>


<div><font face="arial, sans-serif"><br></font></div><span style="font-family:arial,sans-serif;font-size:13px">data1 <- read.delim(file.choose(),</span><span style="font-family:arial,sans-serif;font-size:13px">header=TRUE,sep="\t",  fill=TRUE, fileEncoding = "UTF-16LE")</span><br>


<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><div><font face="arial, sans-serif">R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"</font></div>


<div><font face="arial, sans-serif">Copyright (C) 2012 The R Foundation for Statistical Computing</font></div><div><font face="arial, sans-serif">ISBN 3-900051-07-0</font></div><div><font face="arial, sans-serif">Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)</font></div>


<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">R is free software and comes with ABSOLUTELY NO WARRANTY.</font></div><div><font face="arial, sans-serif">You are welcome to redistribute it under certain conditions.</font></div>


<div><font face="arial, sans-serif">Type 'license()' or 'licence()' for distribution details.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">  Natural language support but running in an English locale</font></div>


<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">R is a collaborative project with many contributors.</font></div><div><font face="arial, sans-serif">Type 'contributors()' for more information and</font></div>


<div><font face="arial, sans-serif">'citation()' on how to cite R or R packages in publications.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Type 'demo()' for some demos, 'help()' for on-line help, or</font></div>


<div><font face="arial, sans-serif">'help.start()' for an HTML browser interface to help.</font></div><div><font face="arial, sans-serif">Type 'q()' to quit R.</font></div><div><font face="arial, sans-serif"><br>


</font></div><div><font face="arial, sans-serif">> data1 <- read.delim(file.choose(),header=TRUE,sep="\t",  fill=TRUE, fileEncoding = "UTF-16LE")</font></div><div><font face="arial, sans-serif">> head(data1)</font></div>


<div><font face="arial, sans-serif">  ID_SERVIDOR_PORTAL                       NOME            CPF</font></div><div><font face="arial, sans-serif">1            1493044  AALINE SEVERIANO DA SILVA ***.592.871-**</font></div>


<div><font face="arial, sans-serif">2            1890528 AARAO CARLOS LUZ MACAMBIRA ***.017.623-**</font></div><div><font face="arial, sans-serif">3            1762984 AARAO CAVALCANTE DE AMORIM ***.292.777-**</font></div>


<div><font face="arial, sans-serif">4            1920165      AARAO DE ANDRADE LIMA ***.559.144-**</font></div><div><font face="arial, sans-serif">5            1611738  AARAO DIAMANTINO OLIVEIRA ***.056.281-**</font></div>


<div><font face="arial, sans-serif">6            1611738  AARAO DIAMANTINO OLIVEIRA ***.056.281-**</font></div><div><font face="arial, sans-serif">  MATRICULA              DESCRICAO_CARGO CLASSE_CARGO</font></div><div><font face="arial, sans-serif">1   019****                                          </font></div>


<div><font face="arial, sans-serif">2   016**** BIBLIOTECARIO-DOCUMENTALISTA            E</font></div><div><font face="arial, sans-serif">3   009**** AGENTE DE SERV DE ENGENHARIA            S</font></div><div><font face="arial, sans-serif">4   003****             PROFESSOR 3 GRAU            V</font></div>


<div><font face="arial, sans-serif">5   000****                                          </font></div><div><font face="arial, sans-serif">6   000****    ANALISTA DO BANCO CENTRAL            E</font></div><div><font face="arial, sans-serif">  REFERENCIA_CARGO PADRAO_CARGO NIVEL_CARGO SIGLA_FUNCAO NIVEL_FUNCAO</font></div>


<div><font face="arial, sans-serif">1               NA                       NA                          </font></div><div><font face="arial, sans-serif">2               NA                       NA                          </font></div>


<div><font face="arial, sans-serif">3               NA                       NA                          </font></div><div><font face="arial, sans-serif">4               NA                       NA                          </font></div>


<div><font face="arial, sans-serif">5               NA                       NA          FBC         FDT1</font></div><div><font face="arial, sans-serif">6               NA           IV          NA                          </font></div>


<div><font face="arial, sans-serif">                                FUNCAO CODIGO_ATIVIDADE</font></div><div><font face="arial, sans-serif">1                                                      </font></div><div><font face="arial, sans-serif">2                                                      </font></div>


<div><font face="arial, sans-serif">3                                                      </font></div><div><font face="arial, sans-serif">4                                                      </font></div><div><font face="arial, sans-serif">5 FUNCAO COMISSIONADA DO BANCO CENTRAL             FDT1</font></div>


<div><font face="arial, sans-serif">6                                                      </font></div><div><font face="arial, sans-serif">            ATIVIDADE OPCAO_FUNCAO_TOTAL</font></div><div><font face="arial, sans-serif">1                                       </font></div>


<div><font face="arial, sans-serif">2                                       </font></div><div><font face="arial, sans-serif">3                                       </font></div><div><font face="arial, sans-serif">4                                       </font></div>


<div><font face="arial, sans-serif">5 CHEFE DE SUBUNIDADE                   </font></div><div><font face="arial, sans-serif">6                                       </font></div><div><font face="arial, sans-serif">                          UORG_LOTACAO COD_ORG_LOTACAO</font></div>


<div><font face="arial, sans-serif">1                                                   NA</font></div><div><font face="arial, sans-serif">2                                                   NA</font></div><div><font face="arial, sans-serif">3                                                   NA</font></div>


<div><font face="arial, sans-serif">4                                                   NA</font></div><div><font face="arial, sans-serif">5 DEPTO. CONTR. GEST. PLAN. SUPERVISAO           25201</font></div><div><font face="arial, sans-serif">6 DEPTO. CONTR. GEST. PLAN. SUPERVISAO           25201</font></div>


<div><font face="arial, sans-serif">              ORG_LOTACAO COD_ORGSUP_LOTACAO          ORGSUP_LOTACAO</font></div><div><font face="arial, sans-serif">1                                         NA                        </font></div>


<div><font face="arial, sans-serif">2                                         NA                        </font></div><div><font face="arial, sans-serif">3                                         NA                        </font></div>


<div><font face="arial, sans-serif">4                                         NA                        </font></div><div><font face="arial, sans-serif">5 BANCO CENTRAL DO BRASIL              25201 BANCO CENTRAL DO BRASIL</font></div>


<div><font face="arial, sans-serif">6 BANCO CENTRAL DO BRASIL              25201 BANCO CENTRAL DO BRASIL</font></div><div><font face="arial, sans-serif">                        UORG_EXERCICIO COD_ORG_EXERCICIO</font></div>


<div><font face="arial, sans-serif">1                                                       </font></div><div><font face="arial, sans-serif">2                                                       </font></div><div><font face="arial, sans-serif">3                                                       </font></div>


<div><font face="arial, sans-serif">4                                                       </font></div><div><font face="arial, sans-serif">5 DEPTO. CONTR. GEST. PLAN. SUPERVISAO             25201</font></div><div><font face="arial, sans-serif">6 DEPTO. CONTR. GEST. PLAN. SUPERVISAO             25201</font></div>


<div><font face="arial, sans-serif">            ORG_EXERCICIO COD_ORGSUP_EXERCICIO</font></div><div><font face="arial, sans-serif">1                                             </font></div><div><font face="arial, sans-serif">2                                             </font></div>


<div><font face="arial, sans-serif">3                                             </font></div><div><font face="arial, sans-serif">4                                             </font></div><div><font face="arial, sans-serif">5 BANCO CENTRAL DO BRASIL                25201</font></div>


<div><font face="arial, sans-serif">6 BANCO CENTRAL DO BRASIL                25201</font></div><div><font face="arial, sans-serif">         ORGSUP_EXERCICIO TIPO_VINCULO SITUACAO_VINCULO</font></div><div><font face="arial, sans-serif">1                                   NA                 </font></div>


<div><font face="arial, sans-serif">2                                   NA                 </font></div><div><font face="arial, sans-serif">3                                   NA                 </font></div><div><font face="arial, sans-serif">4                                   NA                 </font></div>


<div><font face="arial, sans-serif">5 BANCO CENTRAL DO BRASIL            1 ATIVO PERMANENTE</font></div><div><font face="arial, sans-serif">6 BANCO CENTRAL DO BRASIL            2 ATIVO PERMANENTE</font></div><div><font face="arial, sans-serif">  COD_GRUPO_AFASTAMENTO COD_AFASTAMENTO DATA_INICIO_AFASTAMENTO</font></div>


<div><font face="arial, sans-serif">1                                    NA                        </font></div><div><font face="arial, sans-serif">2                                    NA                        </font></div>


<div><font face="arial, sans-serif">3                                    NA                        </font></div><div><font face="arial, sans-serif">4                                    NA                        </font></div>


<div><font face="arial, sans-serif">5                                    NA           Não informada</font></div><div><font face="arial, sans-serif">6                                    NA           Não informada</font></div>


<div><font face="arial, sans-serif">  DATA_TERMINO_AFASTAMENTO       REGIME_JURIDICO JORNADA_DE_TRABALHO</font></div><div><font face="arial, sans-serif">1                                                                   </font></div>


<div><font face="arial, sans-serif">2                                                                   </font></div><div><font face="arial, sans-serif">3                                                                   </font></div>


<div><font face="arial, sans-serif">4                                                                   </font></div><div><font face="arial, sans-serif">5            Não informada REGIME JURIDICO UNICO   40 HORAS SEMANAIS</font></div>


<div><font face="arial, sans-serif">6            Não informada REGIME JURIDICO UNICO   40 HORAS SEMANAIS</font></div><div><font face="arial, sans-serif">  DATA_INGRESSO_CARGOFUNCAO DATA_NOMEACAO_CARGOFUNCAO</font></div><div>


<font face="arial, sans-serif">1                                                  NA</font></div><div><font face="arial, sans-serif">2                                                  NA</font></div><div><font face="arial, sans-serif">3                                                  NA</font></div>


<div><font face="arial, sans-serif">4                                                  NA</font></div><div><font face="arial, sans-serif">5                27/04/2012                        NA</font></div><div><font face="arial, sans-serif">6                05/01/1998                        NA</font></div>


<div><font face="arial, sans-serif">  DATA_INGRESSO_ORGAO DOCUMENTO_INGRESSO_SERVICOPUBLICO</font></div><div><font face="arial, sans-serif">1                                                      </font></div><div><font face="arial, sans-serif">2                                                      </font></div>


<div><font face="arial, sans-serif">3                                                      </font></div><div><font face="arial, sans-serif">4                                                      </font></div><div><font face="arial, sans-serif">5                                             000000000</font></div>


<div><font face="arial, sans-serif">6                                             000000000</font></div><div><font face="arial, sans-serif">  DATA_DIPLOMA_INGRESSO_SERVICOPUBLICO DIPLOMA_INGRESSO_CARGOFUNCAO</font></div>

<div>
<font face="arial, sans-serif">1                                                                NA</font></div><div><font face="arial, sans-serif">2                                                                NA</font></div>


<div><font face="arial, sans-serif">3                                                                NA</font></div><div><font face="arial, sans-serif">4                                                                NA</font></div>


<div><font face="arial, sans-serif">5                        Não informada                           NA</font></div><div><font face="arial, sans-serif">6                        Não informada                           NA</font></div>


<div><font face="arial, sans-serif">  DIPLOMA_INGRESSO_CARGOFUNCAO.1 DIPLOMA_INGRESSO_SERVICOPUBLICO</font></div><div><font face="arial, sans-serif">1                                                               </font></div>


<div><font face="arial, sans-serif">2                                                               </font></div><div><font face="arial, sans-serif">3                                                               </font></div>


<div><font face="arial, sans-serif">4                                                               </font></div><div><font face="arial, sans-serif">5                                                               </font></div>


<div><font face="arial, sans-serif">6 </font></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">2012/10/31 Jakson Alves de Aquino <span dir="ltr"><<a href="mailto:jalvesaq@gmail.com" target="_blank">jalvesaq@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2012/10/31 Roberto de Pinho <<a href="mailto:robertodepinho@gmail.com" target="_blank">robertodepinho@gmail.com</a>>:<br>

<div>> tbm sem sucesso:<br>
><br>
> ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =<br>
> "UTF-16", <a href="http://as.is" target="_blank">as.is</a>=T)<br>
> ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =<br>
> "UTF-16")<br>
> ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =<br>
> "UTF-16LE", <a href="http://as.is" target="_blank">as.is</a>=T)<br>
> ata1 <- read.delim(url,header=TRUE,sep="\t",  fill=TRUE, fileEncoding =<br>
> "UTF-16LE")<br>
<br>
</div>Se estiver usando um sistema operacional que tenha o programa sed<br>
instalado (qualquer distribuição do Linux), uma tentativa pode ser<br>
"limpar" o arquivo, removendo os 0s:<br>
<br>
sed -e 's/\x00//g' teste.csv > teste2.csv<br>
sed -e 's/\xff\xfe//' teste2.csv > teste3.csv<br>
<div><div>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="im">-- <br>"Small steps toward a much better world"<br><br>\begin{signature}<br>Daniel Marcelino<br>Land Phone 1<a href="tel:%2B514%20343%206111%20%233799" value="+5143436111" target="_blank">+514 343 6111 #3799</a><br>
3200 Jean Brillant,  Office C5071<br>

Montreal, QC; H3T 1N8<br>Canada<br>\end{signature}<br>
</div></div>
<br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>
Roberto de Pinho<br><a href="mailto:robertodepinho@gmail.com" target="_blank">robertodepinho@gmail.com</a><br><a href="http://www.ascoisas.com" target="_blank">http://www.ascoisas.com</a><div><a href="http://lattes.cnpq.br/4816166073408660" target="_blank">http://lattes.cnpq.br/4816166073408660</a></div>
<br>
</div>