I have a text file (actually a .csv exported from .xlsx in LibreOffice) with lines that have gibberish when opened in LibreOffice Calc. In VIM they appear as the following:
Joe User, [email protected], p@ss<96>w0rd
The <96>
was some funny character that was similar to -
, but MS Office decided to change it to something else. The file is therefore not ASCII:
$ file -i Users.csv
Users.csv: text/plain; charset=unknown-8bit
Note that all of these 'funny' characters have codepoints less than 127, so I really don't know how Calc and VIM realize that this is not ASCII. What other encodings have all the code points below 127, i.e. are not ASCII compatible? Also, how can I search for these characters in VIM? For non-ASCII characters above 127 I use /[^\x00-\x127]
to search, but of course that will not find <96>
.
The original .xlsx file is still found on another user's Windows computer, and sure enough I can verify in his MS Office that the <96>
character is not ASCII 96 ` but rather some funny variation on '.