Hi,
It is available on Unicode's web site... you need to parse it to create
your own mapping table.
http://www.unicode.org/Public/MAPPINGS/EASTASIA/GB/GB2312.TXT
I used the below perl script for converting to .ucm file.
#/usr/bin/perl
use IO::File;
$fileName1 = "Gb2312.txt";
$fileHandle1 = IO::File->new("< $fileName1" )
or die "could not open file for reading : $! \n";
$fileName2 = "GB2312.ucm";
$fileHandle2= IO::File->new("> $fileName2" )
or die "could not open file for writing : $! \n";
while(defined ($line = <$fileHandle1>)){
if($line =~ /^\#/){
print $fileHandle2($line);
}
else{
chop();
chomp($line);
($jis, $unicode , $comment)
= split(/\t/,$line);
$unicode =~ s/0x/<U/g;
$jis =~ s/0x//g ;
$bit1= substr($jis,0,2);
$bit2 = substr($jis,2,2);
$jis = "\\x".$bit1."\\x".$bit2;
print $fileHandle2
($unicode.">"."\t".$jis."\t". $comment."\n");
}
}
$fileHandle1->close();
$fileHandle2->close();
Ram Viswanadha
Unicode Software Engineer
IBM
Viswanathan S wrote:
> Hi ,
>
> I am looking for a Mapping Table from Gb2312 character
> encoding
> to Unicode .
> Can anyone give me some references .
>
> Thanks in advance ,
>
> Viswanathan S
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:13 EDT