title: readr: the read_delim function throws error "embedded nul in string: '\0'"
body: <p>I am using the <code>readr</code> library and <code>read_delim</code> function in <code>R</code>. I have a big file it has null spaces, so I run the function like this:</p>
  
  <pre><code>read_delim(paste0(dir,name,".txt"),delim="\t",
  col_types=paste0(c(rep("c",17),rep("_",10),rep("c",2),rep("_",2),rep("c",1),rep("_",28),rep("c",1),rep("c",3),rep("c",12),rep("_",3),rep("c",1),rep("_",4),rep("c",21)),collapse=""),escape_backslash=T,na="NA",quote="'\"",n_max=6,progress=interactive())
  </code></pre>
  
  <p>This code throws the following error:</p>
  
  <blockquote>
    <p>Error in read_tokens(ds, tokenizer, col_types, col_names, n_max =
    n_max,  :    embedded nul in string: '\0'</p>
  </blockquote>
  
  <p>I tried to change "quote" parameter for quote="":</p>
  
  <pre><code>read_delim(paste0(dir,name,".txt"),delim="\t",
  col_types=paste0(c(rep("c",17),rep("_",10),rep("c",2),rep("_",2),rep("c",1),rep("_",28),rep("c",1),rep("c",3),rep("c",12),rep("_",3),rep("c",1),rep("_",4),rep("c",21)),collapse=""),escape_backslash=T,na="NA",quote="",n_max=6,progress=interactive())
  </code></pre>
  
  <p>This function reads my file but the columns mismatched outputting incorrectly.</p>
  
  <p>How can I correct this error?</p>