Debbugs::UTF8(3pm) User Contributed Perl Documentation Debbugs::UTF8(3pm)

Debbugs::UTF8 -- Routines for handling conversion of charsets to UTF8

use Debbugs::UTF8;

This module contains routines which convert from various different charsets to UTF8.

These functions are exported with the :utf8 tag

     %newdata = encode_utf8_structure(%newdata);

Takes a complex data structure and encodes any strings with is_utf8 set into their constituent octets.

     $octets = encode_utf8_safely($string);

Given a $string, returns the octet equivalent of $string if $string is in perl's internal encoding; otherwise returns $string.

Silently returns REFs without encoding them. [If you want to deeply encode REFs, see encode_utf8_structure.]

     $string = decode_utf8_safely($octets);

Given $octets in UTF8, returns the perl-internal equivalent of $octets if $octets does not have is_utf8 set; otherwise returns $octets.

Silently returns REFs without encoding them.

    $utf8 = convert_to_utf8("text","charset");
2020-04-07 perl v5.30.0