0001010 rather than 0100000

Hello guys.
in the sentence “Chuck Noris …”, the 6th char ’ ’ is recognized by my algorithm as a LF =>‘new line feed, new line’ and encoded as 0001010 rather than 0100000.

Using a “hardcoding” loop like:

if (( tableau[i]==’ ’ ));then
code=‘0100000’
fi

dosen’t work either… help ?

In bash?? Sounds to me like maybe problems with IFS. Without seeing your code, it’s hard to know for sure, but I assume that you’re reading stdin with the default IFS, which would cause breaks on any spaces.

  • danBhentschel