I'm trying to import this file:

csv", CharacterEncoding -> "UTF8"]

But I am getting errors like:

$CharacterEncoding::utf8: The byte sequence {240} could not be interpreted as a character in the UTF-8 character encoding. >>

Any idea why? And any solution?

  • $\begingroup$ It's not happy with one of your Emoji characters... This one 😡 seems to be the problem. $\endgroup$ – cormullion Jun 22 '13 at 6:48
  • $\begingroup$ ... in fact there are others which are also not being translated, such as 😋😝 <- (that wasn't me adding a smiley face, just showing you what they are :) $\endgroup$ – cormullion Jun 22 '13 at 7:05
  • 3
    $\begingroup$ New in Mathematica 10: Emoji support! $\endgroup$ – shrx Jun 22 '13 at 8:52
  • $\begingroup$ Anyone knows any fix or workaround? $\endgroup$ – José D. Jun 22 '13 at 12:21
  • $\begingroup$ easy to repair after importing - just replace the four characters with something else... eg StringReplace[#, "ð" ~~ ___ -> ":)"] & /@ text. Workround: don't use Emoji? Pre-process text before importing? $\endgroup$ – cormullion Jun 22 '13 at 14:33

Your Answer

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

Browse other questions tagged or ask your own question.