Why do binary files appear to have multiple text colours when opened in a text editor?

845 views

Why do binary files appear to have multiple text colours when opened in a text editor?

In: Technology

2 Answers

Anonymous 0 Comments

That depends on the editor. Editors are used to working with text mode only and often have different coloring based on context. The ASCII set is 256 characters (more for Unicode but let’s keep it simple). All the upper/lowercase letters, numbers, etc. Some ASCII symbols are used for newline, tab, space, etc and others have other control meanings (non-printable characters). To an editor it doesn’t know what type of file it is, and might display non-printable characters in a different color.

You are viewing 1 out of 2 answers, click here to view all answers.