Skip to main content
10 events
when toggle format what by license comment
Feb 21, 2023 at 13:53 comment added rhermans @Domen yeah, I see, and in the same documentation right after listing "Unicode" it says "A complete list of possible encodings is given by $CharacterEncodings." Which is not true, because MemberQ["Unicode"]@$CharacterEncodings -> False. Your answer is good (+1) my complaint is not against you or your answer, but against the documentation. BTW, it just happened to me that some CSV data exported by a Leica microscopy software needed this solution. Thanks! I tested all encoding on $CharacterEncodings before finding your answer.
Feb 21, 2023 at 12:32 comment added Domen @rhemans, I don't know, but it is explicitly mentioned in the documentation for importing Text, together with the remark about the byte order mark.
Feb 21, 2023 at 11:00 comment added rhermans But why then MemberQ["Unicode"]@$CharacterEncodings is False?
Jan 3, 2022 at 12:24 comment added Anton Antonov @tobalt Serves you right! For using other tools, not just Mathematica...
Jan 3, 2022 at 12:12 history edited Domen CC BY-SA 4.0
deleted 3 characters in body
Jan 3, 2022 at 12:08 comment added tobalt The file was generated from another tool, so this can be the origin. However, I then opened the file with Notepad (normal version) and edited it to contain test. And saved it under a new name. Seems that Notepad still preserved the original encoding of that other software. When importing and saving with Excel, Excel destroys the original encoding and removes the Mathematica import issues. However, your solution with CharacterEncoding -> "Unicode" is more elegant because I can import directly from the other software.
Jan 3, 2022 at 12:05 comment added Domen How did you generate your text file? With Notepad on Win10? Be careful on the selected encoding in the Save dialog.
Jan 3, 2022 at 12:01 comment added tobalt Thanks. It is strange that I have never encountered this issue in 10+ years of Mathematica usage on multiple OS and computers.
Jan 3, 2022 at 12:00 vote accept tobalt
Jan 3, 2022 at 11:57 history answered Domen CC BY-SA 4.0