Manual

- Overview
- Tutorials
- FAQs
- History / Changes
- License

Reference

- Language
- Functions
- Operators
- Special Variables
- Pragmas
- Utilities
- Internals
- Platform Specific

Modules

- A • B • C • D • E
- F • G • H • I • L
- M • N • O • P • S
- T • U • X

News / Blogs

- Perl Buzz
- Perl Iron Man
- Perlsphere
- Planet Perl
- TPF news
- Use Perl

See also

- CPAN
- Perl.org
- Perl.com
- Perl 5 Wiki
- Perl Jobs
- Perl Mongers
- Perl Monks

Contact

- Site designed and maintained by Jon Allen (JJ)
- http://perl.jonallen.info

- View the project page and FAQs

# Encode::GSM0338

Perl 5 version 10.1 documentation
Go to top • Show page index • Download PDF

# Encode::GSM0338

- NAME
- SYNOPSIS
- DESCRIPTION
- NOTES
- BUGS
- SEE ALSO

# 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

Page index

- NAME
- SYNOPSIS
- DESCRIPTION
- NOTES
- BUGS
- SEE ALSO

Recently read

Tools

- Preferences