File: README

package info (click to toggle)
libtext-iconv-perl 1.7-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 80 kB
  • ctags: 5
  • sloc: makefile: 49; perl: 13
file content (98 lines) | stat: -rw-r--r-- 3,541 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Text::Iconv Version 1.6

Copyright � 2007 Michael Piotrowski.  All Rights Reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

Description
-----------

This module provides a Perl interface to the iconv() codeset
conversion function, as defined by the Single UNIX Specification.  For
more details see the POD documentation embedded in the file Iconv.pm,
which will also be installed as Text::Iconv(3) man page.

Prerequisites
-------------

Your system should be compliant with the Single UNIX Specification or
at least provide iconv_open(), iconv() and iconv_close() functions
compliant with it.

Note that the possible conversions and the quality of the conversions
depend on the available iconv conversion tables and algorithms, which
are in most cases supplied by the operating system vendor.  Some
systems also allow you to build your own tables (e.g., HP-UX, Tru64
UNIX, and AIX provide the genxlt(1) command).

It is also possible to use a separate iconv library such as GNU
libiconv package, just make sure that the desired library is found
(see <http://www.gnu.org/directory/localization/libiconv.html>).

Building the module
-------------------

Since the Single UNIX Specification only specifies an interface,
several issues are left to the implementation to define, namely:

    1. The supported codesets
    2. The supported conversions
    3. The names for the supported codesets

Please check your system documentation for the above points.

The module can be built using this sequence of commands:

    perl Makefile.PL
    make
    make test

On some systems, the iconv functions are in libc; on others (and when
you want to use a separate iconv library, such as GNU libiconv), you
have to link with -liconv.  Makefile.PL tries to automatically detect
this.  However, if your iconv library is in a non-standard path, you
might have to help it.  You can specify library and include paths like
this:

    perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include

You might also have to do this if you have multiple iconv
implementations installed and want to use a specific one.

The purpose of the test scripts (run by "make test") is to check if an
iconv library can be found, and if the iconv functions can be called.
It is neither intended to find out which conversions are supported,
nor to test the quality of the conversions provided by your iconv
library.  However, since the iconv functions can only be tested by
calling them, which in turn requires the specification of codesets to
be converted.  The test scripts try some conversions which seem to be
widely supported.  Conversions not supported by your iconv
implementation are skipped, but for the purpose outlined above this is
no problem, as it shows that the iconv functions are working.  There
is no standard way to find out which conversions are supported by an
implementation.  This is also the reason why Text::Iconv can't provide
platform-independent support for codeset identifiers (even if it it
would be nice to have).

Installation
------------

    make install

Feedback
--------

Text::Iconv was tested on various platforms and with different iconv
implementations.

If you built Text::Iconv on a platform where you needed to specify
additional libraries, or where none of the codeset identifiers in the
test scripts are supported, please drop me a note.

Thanks
------

Thanks go to all those who reported bugs and suggested features.

Michael Piotrowski <mxp@dynalabs.de>