Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

difference between text edit and hex editor?

Firstly apologies if I've posted in the wrong forum. Other than a few experiements with terminal/applescript I am a complte novice when it comes to coding. I am curious - when i 'force' the OS to open a non-text file (for example a jpeg) in text editor I get a load of code (which i am unable to post) Is this what you would get using a hex editor? If so why do people not use text edit - or is it a different computer language?

Message was edited by: tmx3

mac pro, Mac OS X (10.5.6)

Posted on Jun 23, 2009 3:50 AM

Reply
4 replies
Sort By: 

Jun 23, 2009 4:24 AM in response to tmx3

Find some basic reading material on how computers work.
Read up on how a computer displays letters on the screen.
Read up on how a computer displays pictures on the screen.
They use a text window to display text and they use a graphics window to display pictures. The same Hexadecimal numbers will look very different on each type of computer "window".

Go to "How stuff works.com" Look in computers.. etc or any good book store.

Hexadecimal code is a convenient numbering system for computers to use.
It's a mathematical numbering system using a base of 16 rather than 10 which we usually use. ie; 0123456789 (10 numbers) as opposed to 0123456789ABCDEF (16 numbers used in Hexadecimal).

There's much to learn, get started !!

TTab
Reply

Jun 23, 2009 6:57 AM in response to tmx3

Any file is made up of a sequence of bytes. Each byte is a sequence of 8 bits. Each bit is either 1 or 0. Therefore, each byte can have a value between 0 and 255. Using ASCII encoding, each byte value represents a particular character, such as 'A', 'B', 't', '#', etc. In the entire range of 256 ASCII characters, only a subset are considered to be "printable". If there is a file made up of only those printable characters, that file is considered to be "text". If there is a single character outside of the "printable" range, the file is considered to be binary.

A "text" file is sometimes treated specially and can have its line ending character \n, \r, or both, changed or switched around depending on the operating system. It is a long story.

A hex editor will display all of the printable characters in a file and represent the non-printable characters with just a '.' or space. It will also display the hexadecimal value of each character, printable and non-printable. It may also be able to group bytes together and extract some higher-level meaning out of them.
Reply

difference between text edit and hex editor?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.