logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

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

Functions

Name

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

Synopsis

       use Debbugs::UTF8;

Utf-8

       These functions are exported with the :utf8 tag

   encode_utf8_structure
            %newdata = encode_utf8_structure(%newdata);

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

   encode_utf8_safely
            $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.]

   decode_utf8_safely
            $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.

   convert_to_utf8
           $utf8 = convert_to_utf8("text","charset");

perl v5.40.1                                       2025-02-24                                 Debbugs::UTF8(3pm)

See Also