ascii vs chinese char

Can someone point me to some info about text file handling. The question is: how does a text editor - like gedit - 'know' which type of character it has to show, like Chinese. I thought it was all some kind like ascii. I don't seem to see a difference between both binary codes. So what is the trick?

The file is probably stored as UTF-8. Not sure how gedit detects the encoding but I think UTF-8 is the default encoding that it uses, and if all data in the file is valid UTF-8 it will probably assume the file uses UTF-8.

UTF-8 is backward compatible with ASCII (all characters in ASCII are stored the same way in UTF-8) so a program that use UTF-8 will handle ASCII without problem.
Last edited on
Topic archived. No new replies allowed.