As I recall,
-ne is a comparison for integer values. Bash keeps strict separation between numeric comparison and text comparison. To compare text, use the
!= operator.
This doesn't answer your question of converting to ASCII, but that's probably not really the road you should take.
For details on all the available operators, issue a
man test from the command line.