Security Advisories (3)
CVE-2016-1238 (2016-07-27)

Loading optional modules from . (current directory).

CVE-2021-36770 (2021-07-17)

Encode.pm, as distributed in Perl through 5.34.0, allows local users to gain privileges via a Trojan horse Encode::ConfigLocal library (in the current working directory) that preempts dynamic module loading. Exploitation requires an unusual configuration, and certain 2021 versions of Encode.pm (3.05 through 3.11). This issue occurs because the || operator evaluates @INC in a scalar context, and thus @INC has only an integer value.

CVE-2011-2939 (2012-01-13)

Off-by-one error in the decode_xs function in Unicode/Unicode.xs in the Encode module before 2.44, as used in Perl before 5.15.6, might allow context-dependent attackers to cause a denial of service (memory corruption) via a crafted Unicode string, which triggers a heap-based buffer overflow.

NAME

Encode::GSM0338 -- ESTI GSM 03.38 Encoding

SYNOPSIS

use Encode qw/encode decode/; 
$gsm0338 = encode("gsm0338", $utf8);    # loads Encode::GSM0338 implicitly
$utf8    = decode("gsm0338", $gsm0338); # ditto

DESCRIPTION

GSM0338 is for GSM handsets. Though it shares alphanumerals with ASCII, control character ranges and other parts are mapped very differently, mainly to store Greek characters. There are also escape sequences (starting with 0x1B) to cover e.g. the Euro sign.

This was once handled by Encode::Bytes but because of all those unusual specifications, Encode 2.20 has relocated the support to this module.

NOTES

Unlike most other encodings, the following aways croaks on error for any $chk that evaluates to true.

$gsm0338 = encode("gsm0338", $utf8      $chk);
$utf8    = decode("gsm0338", $gsm0338,  $chk);

So if you want to check the validity of the encoding, surround the expression with eval {} block as follows;

eval {
  $utf8    = decode("gsm0338", $gsm0338,  $chk);
};
if ($@){
  # handle exception here
}

BUGS

ESTI GSM 03.38 Encoding itself.

Mapping \x00 to '@' causes too much pain everywhere.

Its use of \x1b (escape) is also very questionable.

Because of those two, the code paging approach used use in ucm-based Encoding SOMETIMES fails so this module was written.

SEE ALSO

Encode