summaryrefslogtreecommitdiff
path: root/ext/Encode/Byte
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-29 02:30:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-29 02:30:48 +0000
commit67d7b5efba6bec0629bea8f1e11cea68499f85da (patch)
tree79d7d3bb52364270b2b28566193c9c828d724964 /ext/Encode/Byte
parent51e9e896dac578201e3ff6f3afd2c809bebc4c7d (diff)
downloadperl-67d7b5efba6bec0629bea8f1e11cea68499f85da.tar.gz
Upgrade to Encode 1.00, from Dan Kogai.
(one nit: bin/enc2xs needed also ../..) p4raw-id: //depot/perl@15589
Diffstat (limited to 'ext/Encode/Byte')
-rw-r--r--ext/Encode/Byte/Byte.pm101
-rw-r--r--ext/Encode/Byte/Makefile.PL18
2 files changed, 65 insertions, 54 deletions
diff --git a/ext/Encode/Byte/Byte.pm b/ext/Encode/Byte/Byte.pm
index 5b49dd9d89..af83d00c78 100644
--- a/ext/Encode/Byte/Byte.pm
+++ b/ext/Encode/Byte/Byte.pm
@@ -1,12 +1,13 @@
package Encode::Byte;
use Encode;
-our $VERSION = do { my @r = (q$Revision: 0.96 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
use XSLoader;
XSLoader::load('Encode::Byte',$VERSION);
1;
__END__
+
=head1 NAME
Encode::Byte - Single Byte Encodings
@@ -25,52 +26,62 @@ supported are as follows.
Canonical Alias Description
--------------------------------------------------------------------
- iso-8859-1 latin1
- iso-8859-2 latin2
- iso-8859-3 latin3
- iso-8859-4 latin4
- iso-8859-5 latin
- iso-8859-6 latin
- iso-8859-7
- iso-8859-8
- iso-8859-9 latin5
- iso-8859-10 latin6
+ # ISO 8859 series
+ (iso-8859-1 is in built-in)
+ iso-8859-2 latin2 [ISO]
+ iso-8859-3 latin3 [ISO]
+ iso-8859-4 latin4 [ISO]
+ iso-8859-5 [ISO]
+ iso-8859-6 [ISO]
+ iso-8859-7 [ISO]
+ iso-8859-8 [ISO]
+ iso-8859-9 latin5 [ISO]
+ iso-8859-10 latin6 [ISO]
iso-8859-11
(iso-8859-12 is nonexistent)
- iso-8859-13 latin7
- iso-8859-14 latin8
- iso-8859-15 latin9
- iso-8859-16 latin10
-
- koi8-f
- koi8-r
- koi8-u
-
- viscii # ASCII + vietnamese
-
- cp1250 WinLatin2
- cp1251 WinCyrillic
- cp1252 WinLatin1
- cp1253 WinGreek
- cp1254 WinTurkiskh
- cp1255 WinHebrew
- cp1256 WinArabic
- cp1257 WinBaltic
- cp1258 WinVietnamese
- # all cp* are also available as ibm-* and ms-*
-
- maccentraleuropean
- maccroatian
- macroman
- maccyrillic
- macromanian
- macdingbats
- macsami
- macgreek
- macthai
- macicelandic
- macturkish
- macukraine
+ iso-8859-13 latin7 [ISO]
+ iso-8859-14 latin8 [ISO]
+ iso-8859-15 latin9 [ISO]
+ iso-8859-16 latin10 [ISO]
+
+ # Cyrillic
+ koi8-f
+ koi8-r [RFC1489]
+ koi8-u [RFC2319]
+
+ # Vietnamese
+ viscii
+
+ # all cp* are also available as ibm-*, ms-*, and windows-*
+ # also see L<http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset4.asp>
+ cp1250 WinLatin2
+ cp1251 WinCyrillic
+ cp1252 WinLatin1
+ cp1253 WinGreek
+ cp1254 WinTurkiskh
+ cp1255 WinHebrew
+ cp1256 WinArabic
+ cp1257 WinBaltic
+ cp1258 WinVietnamese
+
+ # Macintosh
+ # Also see L<http://developer.apple.com/technotes/tn/tn1150.html>
+ MacCentralEurRoman
+ MacCroatian
+ MacRoman
+ MacCyrillic
+ MacRomanian
+ MacSami
+ MacGreek
+ MacThai
+ MacIcelandic
+ MacTurkish
+ MacUkrainian
+
+ # More vendor encodings
+ nextstep
+ gsm0338 # used in GSM handsets
+ hp-roman8
=head1 DESCRIPTION
diff --git a/ext/Encode/Byte/Makefile.PL b/ext/Encode/Byte/Makefile.PL
index 4f1bd283a8..57ee63e63d 100644
--- a/ext/Encode/Byte/Makefile.PL
+++ b/ext/Encode/Byte/Makefile.PL
@@ -8,7 +8,7 @@ my %tables = (
[
'gsm0338.ucm',
'nextstep.ucm',
- 'roman8.ucm',
+ 'hp-roman8.ucm',
'viscii.ucm',
],
koi8_t => [ 'koi8-f.ucm', 'koi8-r.ucm', 'koi8-u.ucm', ],
@@ -41,7 +41,7 @@ while (defined(my $file = readdir(ENC)))
closedir(ENC);
WriteMakefile(
- INC => "-I..",
+ INC => "-I../Encode",
NAME => 'Encode::'.$name,
VERSION_FROM => "$name.pm",
OBJECT => '$(O_FILES)',
@@ -71,7 +71,7 @@ sub post_initialize
$self->{'O_FILES'} = [sort keys %o];
my @files = ("$name.xs");
$self->{'C'} = ["$name.c"];
- $self->{'H'} = [$self->catfile($self->updir,'encode.h')];
+ $self->{'H'} = [$self->catfile($self->updir,'Encode', 'encode.h')];
my %xs;
foreach my $table (keys %tables) {
push (@{$self->{'C'}},"$table.c");
@@ -89,7 +89,7 @@ sub post_initialize
#include <perl.h>
#include <XSUB.h>
#define U8 U8
-#include "../encode.h"
+#include "encode.h"
END
foreach my $table (keys %tables) {
print XS qq[#include "${table}.h"\n];
@@ -132,7 +132,7 @@ sub postamble
{
my $self = shift;
my $dir = $self->catdir($self->updir,'Encode');
- my $str = "# $name\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by compile\n";
+ my $str = "# $name\$(OBJ_EXT) depends on .h and _def.h files not .c files - but all written by enc2xs\n";
$str .= "$name.c : $name.xs ";
foreach my $table (keys %tables)
{
@@ -141,13 +141,13 @@ sub postamble
$str .= "\n\n";
$str .= "$name\$(OBJ_EXT) : $name.c\n\n";
- my $compile = $self->catfile($self->updir,'compile');
+ my $enc2xs = $self->catfile($self->updir,'bin', 'enc2xs');
foreach my $table (keys %tables)
{
my $numlines = 1;
my $lengthsofar = length($str);
my $continuator = '';
- $str .= "$table.c : $compile Makefile.PL";
+ $str .= "$table.c : $enc2xs Makefile.PL";
foreach my $file (@{$tables{$table}})
{
$str .= $continuator.' '.$self->catfile($dir,$file);
@@ -160,8 +160,8 @@ sub postamble
}
}
$str .= $^O eq 'VMS' # In VMS quote to preserve case
- ? qq{\n\t\$(PERL) $compile -"Q" -o \$\@ -f $table.fnm\n\n}
- : qq{\n\t\$(PERL) $compile -Q -o \$\@ -f $table.fnm\n\n};
+ ? qq{\n\t\$(PERL) $enc2xs -"Q" -o \$\@ -f $table.fnm\n\n}
+ : qq{\n\t\$(PERL) $enc2xs -Q -o \$\@ -f $table.fnm\n\n};
open (FILELIST, ">$table.fnm")
|| die "Could not open $table.fnm: $!";
foreach my $file (@{$tables{$table}})