LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2010, 11:42 PM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Rep: Reputation: 53
What kind of code has shapes in it?


When I open program files in windows some of them are almost nothing but boxes and triangles. I was always curious what the hell it was.


Thanks / Reputation (whatever) in advance!
 
Old 09-11-2010, 01:04 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
You mean when you open binary files in Notepad?

It's dividing the file into 8-bit chunks and treating each 8 bit chunk as an index into the ASCII table. Say, it reads 8 bits from the file and gets "11011011". This is 219 in decimal. ASCII character #219 is a box, so that's what it displays. It then reads the next 8 bits and gets another number from 0 to 255. It then displays the character corresponding to that number.

This is the chart. As you can see, there are 256 characters, some of which are boxes and some of which are triangles.
http://www.plcdev.com/ascii_chart

Obviously, the "code" that ends up getting displayed doesn't mean anything.

Last edited by dugan; 09-11-2010 at 01:11 AM.
 
1 members found this post helpful.
Old 09-11-2010, 01:33 AM   #3
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
That's far out Man! Or maybe I'm far out.

You must know how when the file does not have an extension for it on windows and It asks if you want it to find out what kind of file it is from the internet. I have Never had it work. I say "Note Pad for everything"! I tried to add to your reputation but it would not allow me so this will have to suffice. "You cannot give Reputation to the same post twice." I could not do it even once.Thanks again!
Attached Thumbnails
Click image for larger version

Name:	cheech_chong-small.jpg
Views:	10
Size:	18.1 KB
ID:	4570  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: IntelliJ's Maia shapes up against Eclipse LXer Syndicated Linux News 0 05-29-2009 11:01 PM
Creating forms from basic shapes with moving parts in Java3D gvp87 Programming 0 10-30-2007 10:37 PM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 01:37 AM
giFT network plugins + Xorg shapes missing alaindu Linux - Software 0 05-19-2005 02:02 PM
kind of a programming quesion...kind of not tho jhorvath Programming 2 06-30-2003 10:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration