Changeset 4229
- Timestamp:
- 2003-05-06T15:46:31+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/unicode.pm
r3834 r4229 230 230 # 231 231 # Examples of encodings that may be converted using singlebyte2unicode are 232 # the iso-8859 and windows-125* series ).232 # the iso-8859 and windows-125* series. 233 233 sub singlebyte2unicode { 234 234 my ($encodename, $textref) = @_; … … 385 385 # @array256 is used for initialisation, there must be 386 386 # a better way... 387 # What about this?: @array256 = (0) x 256; 387 388 @array256 = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 388 389 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, … … 429 430 } 430 431 431 sub unicode2koi8r { 432 my ($uniref) = @_; 433 432 # unicode2singlebyte converts unicode to simple 8 bit encodings where 433 # characters below 0x80 are normal ascii characters and the rest are encoded 434 # using the appropriate mapping files. 435 # 436 # Examples of encodings that may be converted using unicode2singlebyte are 437 # the iso-8859 and windows-125* series, KOI8-R (Russian), and the Kazakh encoding. 438 sub unicode2singlebyte { 439 my ($uniref, $encoding) = @_; 440 434 441 my $outtext = ""; 435 my $encodename = "unicode- koi8_r";436 my $enc_info = $encodings::encodings->{" koi8_r"};442 my $encodename = "unicode-$encoding"; 443 my $enc_info = $encodings::encodings->{"$encoding"}; 437 444 my $mapfile = &util::filename_cat($ENV{'GSDLHOME'}, "mappings", 438 445 "from_uc", $enc_info->{'mapfile'});
Note:
See TracChangeset
for help on using the changeset viewer.