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$
4
  • $\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
    Commented Oct 18, 2019 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
    Commented Oct 18, 2019 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
    Commented Oct 18, 2019 at 21:44
  • $\begingroup$ @Indeterminate Please try Import["yourfilenamehere", "CSV" , CharacterEncoding -> "UTF-8"] $\endgroup$
    – Hans
    Commented Oct 18, 2019 at 22:09

1 Answer 1

2
$\begingroup$

Try

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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