How do I determine file encoding in OS X?

后端 未结 15 1003
死守一世寂寞
死守一世寂寞 2020-11-29 15:12

I\'m trying to enter some UTF-8 characters into a LaTeX file in TextMate (which says its default encoding is UTF-8), but LaTeX doesn\'t seem to understand them.

Runn

15条回答
  •  甜味超标
    2020-11-29 15:50

    The @ means that the file has extended file attributes associated with it. You can query them using the getxattr() function.

    There's no definite way to detect the encoding of a file. Read this answer, it explains why.

    There's a command line tool, enca, that attempts to guess the encoding. You might want to check it out.

提交回复
热议问题