# On 5.6.x, it can be as simple as # $latin1 = pack 'C*', unpack 'U*', $utf8; #See the docs on pack for 5.6.1. Search for "C0".