, you are invoking the Perl internal character set. The display values are therefore not 1/2, etc. but a single character ½ that looks similar. As such, to convert to a decimal, you need to associate that fraction character with the appropriate decimal value. The inverse function of chr is
) to find all appropriate values. I would recommend checking the
for some mappings you could "borrow".