Encode::GSM0338 - ESTI GSM 03.38 Encoding
use Encode qw/encode decode/;
$gsm0338 = encode("gsm0338", $utf8); # loads Encode::GSM0338 implicitly
$utf8 = decode("gsm0338", $gsm0338); # ditto
Perl Programmers Reference Guide Encode::GSM0338(3)
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.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+---------------+-----------------------+
|ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+---------------+-----------------------+
|Availability | runtime/perl-532 |
+---------------+-----------------------+
|Stability | Pass-through volatile |
+---------------+-----------------------+
NOTES
Unlike most other encodings, the following always 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);
} or do {
# handle exception here
};
Source code for open source software components in Oracle Solaris can
be found at https://www.oracle.com/downloads/opensource/solaris-source-
code-downloads.html.
This software was built from source available at
https://github.com/oracle/solaris-userland. The original community
source was downloaded from
http://www.cpan.org/src/5.0/perl-5.32.0.tar.gz.
Further information about this software can be found on the open source
community website at https://www.perl.org/.
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
perl v5.32.0 2020-06-14 Encode::GSM0338(3)