I have been trying to copy and paste some code into LyX (via the 'Program Listings' menu item), and when I compile the document I get the LyX error:
Could not find LaTeX command for character '' (code point 0x2009)
LyX also suggested I convert the document I am attempting to copy and paste to UTF-8. However, I ran a file --mime <mycodefile.py>
and a file --mime <mycodefile.py>
and both return charset=us-ascii
.
Correct if I'm wrong, but isn't ascii a subset of UTF-8? If so, where is this offending 0x2009 character coming from, and how to I fix this issue?
Thanks
Note: instead of copying and pasting, I tried using 'Insert> File > Plain Text ...', and I got the same error. So it's not like the text is being reencoded somehow in the clipboard.
EDIT:
for some reason, after restarting lyx i could compile (slaps forehead). when I copy/pasted originally, the encoding may have been unicode, but then I cntl-Z'd and switched it to UTF-8 using vim. This error somehow persisted until restart.