1Encode::GSM0338(3)    User Contributed Perl Documentation   Encode::GSM0338(3)
2
3
4

NAME

6       Encode::GSM0338 -- ESTI GSM 03.38 Encoding
7

SYNOPSIS

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

DESCRIPTION

14       GSM0338 is for GSM handsets. Though it shares alphanumerals with ASCII,
15       control character ranges and other parts are mapped very differently,
16       mainly to store Greek characters.  There are also escape sequences
17       (starting with 0x1B) to cover e.g. the Euro sign.
18
19       This was once handled by Encode::Bytes but because of all those unusual
20       specifications, Encode 2.20 has relocated the support to this module.
21

NOTES

23       Unlike most other encodings,  the following aways croaks on error for
24       any $chk that evaluates to true.
25
26         $gsm0338 = encode("gsm0338", $utf8      $chk);
27         $utf8    = decode("gsm0338", $gsm0338,  $chk);
28
29       So if you want to check the validity of the encoding, surround the
30       expression with "eval {}" block as follows;
31
32         eval {
33           $utf8    = decode("gsm0338", $gsm0338,  $chk);
34         };
35         if ($@){
36           # handle exception here
37         }
38

BUGS

40       ESTI GSM 03.38 Encoding itself.
41
42       Mapping \x00 to '@' causes too much pain everywhere.
43
44       Its use of \x1b (escape) is also very questionable.
45
46       Because of those two, the code paging approach used use in ucm-based
47       Encoding SOMETIMES fails so this module was written.
48

SEE ALSO

50       Encode
51
52
53
54perl v5.16.3                      2013-04-29                Encode::GSM0338(3)
Impressum