Juas, he estado revisando...
Ojo el código inteligente de
http://www.theskull.com/javascript/ascii-binary.html Código PHP:
//Ascii -- Binary Code
if (let == "A") {letbin = letbin + sep + '01000001'}
if (let == "B") {letbin = letbin + sep + '01000010'}
if (let == "C") {letbin = letbin + sep + '01000011'}
if (let == "D") {letbin = letbin + sep + '01000100'}
if (let == "E") {letbin = letbin + sep + '01000101'}
if (let == "F") {letbin = letbin + sep + '01000110'}
.
.
.
if (let == "÷") {letbin = letbin + sep + '11110111'}
if (let == "ø") {letbin = letbin + sep + '11111000'}
if (let == "ù") {letbin = letbin + sep + '11111001'}
if (let == "ú") {letbin = letbin + sep + '11111010'}
if (let == "û") {letbin = letbin + sep + '11111011'}
if (let == "û") {letbin = letbin + sep + '11111100'}
if (let == "ý") {letbin = letbin + sep + '11111101'}
if (let == "þ") {letbin = letbin + sep + '11111110'}
if (let == "ÿ") {letbin = letbin + sep + '11111111'}
Yo no sé quién se habrá dedicado a sacar ese código, pero... así cualquiera, eh? Es que estan toditas las letras, hasta la 11111111... Y lo bueno es que para traducir tiene la misma tabla, pero al revés!
Código PHP:
if (let == "01000001") {letasc = letasc + 'A'}
if (let == "01000010") {letasc = letasc + 'B'}
if (let == "01000011") {letasc = letasc + 'C'}
if (let == "01000100") {letasc = letasc + 'D'}
.
.
.
if (let == "11111100") {letasc = letasc + 'û'}
if (let == "11111101") {letasc = letasc + 'ý'}
if (let == "11111110") {letasc = letasc + 'þ'}
if (let == "11111111") {letasc = letasc + 'ÿ'}
Ni siquiera se ha dignado a meterlo en un array y comerse la cabeza... (por cierto, el código no es de la web, es un copypaste del autor G. Marshall Brown.
Eso es programar y lo demás son tonterías...