I basically want to read a file (could be an mp3 file or whatever). Scan the file for all the used ASCII characters of the file and put them into an dictionary, array or list. And then from there assign each character a number value.
For example:
Let's say I load in the file blabla.mp3
(Obviously this type of file is encoded so it won't be just plain english characters.)
This is it's contents:
╤dìúúH»╓╒:φººMQ╤╤╤╤┤i↔↔←GGGΦ⌠i←E::2E┤tti←╙╤ΦΦ⌠·:::::%Fæ╤╤:6Å⌠tSN│èëåD¿╢ÄÄÄÄÄÄÄÄÅO^↔:::.ÄÄÄÄÄÄèHΦΦ■ï»ó⌐╙-↔→E┤tttttttt}▲î╤╤dì"Ü:::)ú$tm‼º╤╓q╤╙·:.ñÇ°"V├╡ΦPa↨/úúúúúúΦ╞îHΦ║*ÄèúóΦΦΦΦ»DΦΦ·tΘ○_Nïúkî►"DëÜ)#ú»→·:4Äïúúúúúó¿║:(  ·:ç↑PR"$RGH◄◘úúó¿ΦΦΦΦ┌&HΦΦ┌+⌠WºGG ╤m→GF╘±"¿ΦñïúúúóΦò↨FæTtt╓ìú⌠ΦΦΦ⌠z:::=:::::≥E╤╤╤╤╤╤╤Tm↔↔▬Hªèi⌠ztz:::tt
I want to figure out what characters are being used and assign each one a value from 0 - 255 and each value will be unique to that character.
So ╤ = 0; Φ = 56; ú = 25 etc etc etc
Now I've been searching the python and java docs and I'm not so sure I know what I'm searching for. And I don't know if I should be worrying about ASCII characters or HEX or the raw bytes of the file.
I just need someone to point me in the right direction. Any help?
Each byte  is a number from 0 to 255. An array containing those numbers is, precisely, an array containing the contents of the file. I'm not at all clear on what you want to do with this array (or dictionary, etc) but making it is going to be easy.
How can I bring all the used ASCII characters of a file into a dictionary/array/list and assign each character a value?