GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LOCALE::RECODEDATA (3)

.ds Aq ’

NAME

Locale::RecodeData - Abstract Base Class for Charset Converters

CONTENTS

SYNOPSIS



    # For compatibility with Perl 5.005 and earlier, you must
    # *use* the module before inheriting from it!
    use qw (Locale::RecodeData);
    use base qw (Locale::RecodeData);



DESCRIPTION

The module <B>Locale::RecodeDataB> serves as an abstract base class to all converters used by Locale::Recode(3).

Adding new conversion modules is currently not straightforward, and you will have to edit the sources of some modules for that purpose.

First, you have to add your new converter class to the list found in Locale::_Conversions(3), so that Locale::Recode(3) knows about its presence. If there are valid aliases for the codeset of your converter, you will also have to edit Locale::_Aliases(3).

Finally, you have to implement the (protected) conversion routine _recode(). See below (INTERFACE) for details.

CONSTRUCTOR

<B>new (from => FROM_CODESET, to => TO_CODESET)B> The constructor takes two (named) arguments:
<B>fromB> The canonical name of the source codeset. Aliases have already been resolved and the name is converted to uppercase.
<B>toB> The canonical name of the destination codeset. Aliases have already been resolved and the name is converted to uppercase.

You normally don’t have to implement the constructor. The default constructor implemented here will store the source and destination codesets in the protected members _from and _to.

METHODS

The class implements one method:
<B>_getErrorB> Returns the (protected) member _error.

INTERFACE

New conversion classes must provide the following interface:
<B>new (from => FROM_CODESET, to => TO_CODESET)B> The constructor takes two (named) arguments:
<B>fromB> The canonical name of the source codeset. Aliases have already been resolved and the name is converted to uppercase.
<B>toB> The canonical name of the destination codeset. Aliases have already been resolved and the name is converted to uppercase.
<B>_getErrorB> Should return the last error (as a string) or false if there was no error.

This method is implemented in the base class already.

<B>_recode STRINGREFB> Should convert the argument STRINGREF in-place. In case of failure, return false, and make provisions that the method _getError() returns an informative error message.

AUTHOR

Copyright (C) 2002-2015, Guido Flohr <guido.flohr@cantanea.com>, all rights reserved. See the source code for details.

SEE ALSO

Locale::Recode::_Aliases(3pm), Locale::Recode::_Conversions(3pm), Locale::Recode(3pm), perl(1)

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 173: =cut found outside a pod block. Skipping to next block.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LOCALE::RECODEDATA (3) 2015-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.