$utf8_char = pack("U", 300 ) ; ## Change here for 'XX' (the char). print unpack("U", $utf8_char ) ;