URI::Escape is using RFC2396 and updated by RFC2732 for encoding and decoding characters that are not alphanumeric (a-zA-Z_0-9 or simply \w).
Try to figure out what kind of encoding you have to use. Maybe there is an existing module. If not a definition will make it easier for you to write one.