2
$\begingroup$

Whenever I import a CSV file, I get this weird character at the beginning of the file ,I am not sure why. How can I avoid this? enter image description here

$\endgroup$
  • $\begingroup$ I have a guess, but I need a couple of pieces of information, first. First, what version are you using? Second, what does FullForm@data9k[[1]] return? Lastly, what does PacletFind["SVTools"] return? $\endgroup$ – rcollyer Oct 18 '19 at 19:54
  • 1
    $\begingroup$ @Indeterminate like rcollyerI have a guess. I think if it is in all your files that I could be the BOM. $\endgroup$ – Hans Oct 18 '19 at 21:05
  • $\begingroup$ @Indeterminate please see [en.wikipedia.org/wiki/Byte_order_mark] see table. If you concur then how to solve? I believe you need to indicate the Character Encoding in your Import. $\endgroup$ – Hans Oct 18 '19 at 21:44
  • $\begingroup$ @Indeterminate Please try Import["yourfilenamehere", "CSV" , CharacterEncoding -> "UTF-8"] $\endgroup$ – Hans Oct 18 '19 at 22:09
2
$\begingroup$

Try

Import["yourfilenamehere", "CSV", CharacterEncoding -> "UTF-8"] 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.