Text::Iconv man page on OpenServer

Man page or keyword search:  
man Server   5388 pages
apropos Keyword Search (all sections)
Output format
OpenServer logo
[printable version]

Iconv(3)	      User Contributed Perl Documentation	      Iconv(3)

NAME
       Text::Iconv - Perl interface to iconv() codeset conversion function

SYNOPSIS
	 use Text::Iconv;
	 $converter = Text::Iconv->new("fromcode", "tocode");
	 $converted = $converter->convert("Text to convert");

DESCRIPTION
       The Text::Iconv module provides a Perl interface to the iconv() func-
       tion as defined by the Single UNIX Specification.  The convert() method
       converts the encoding of characters in the input string from the from-
       code codeset to the tocode codeset, and returns the result.

       Settings of fromcode and tocode and their permitted combinations are
       implementation-dependent.  Valid values are specified in the system
       documentation

       As an experimental feature, this version of Text::Iconv objects provide
       the retval() method:

	 $result = $converter->convert("lorem ipsum dolor sit amet");
	 $retval = $converter->retval;

       This method can be called after calling convert().  It returns the
       return value of the underlying iconv() function for the last conver-
       sion; according to the Single UNIX Specification, this value indicates
       "the number of non-identical conversions performed."  Note, however,
       that iconv implementations vary widely in the interpretation of this
       specification.

       When called before the first call to convert(), or if an error occured
       during the conversion, retval() returns undef.

ERRORS
       If the conversion can't be initialized an exception is raised (using
       croak()).

       Handling of conversion errors

       Text::Iconv provides a class attribute raise_error and a corresponding
       class method for setting and getting its value.	The handling of errors
       during conversion depends on the setting of this attribute.  If
       raise_error is set to a true value, an exception is raised; otherwise,
       the convert() method only returns undef.	 By default raise_error is
       false.  Example usage:

	 Text::Iconv->raise_error(1);	  # Conversion errors raise exceptions
	 Text::Iconv->raise_error(0);	  # Conversion errors return undef
	 $a = Text::Iconv->raise_error(); # Get current setting

       Per-object handling of conversion errors

       As an experimental feature, Text::Iconv also provides an instance
       attribute raise_error and a corresponding method for setting and get-
       ting its value.	If raise_error is undef, the class-wide settings
       apply.  If raise_error is 1 or 0 (true or false), the object settings
       override the class-wide settings.

       Consult iconv(3) for details on errors that might occur.

       Conversion of undef

       Converting undef, e.g.,

	 $converted = $converter->convert(undef);

       always returns undef.  This is not considered an error.

NOTES
       The supported codesets, their names, the supported conversions, and the
       quality of the conversions are all system-dependent.

AUTHOR
       Michael Piotrowski <mxp@dynalabs.de>

SEE ALSO
       iconv(1), iconv(3)

perl v5.8.8			  2004-07-17			      Iconv(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OpenServer

List of man pages available for OpenServer

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net