Changeset 318

Show
Ignore:
Timestamp:
10/31/01 04:04:07
Author:
miyagawa
Message:

update

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Convert-RACE/trunk/Changes

    r178 r318  
    11Revision history for Perl extension Convert::RACE. 
     2 
     30.07  Wed Oct 31 04:03:59 JST 2001 
     4        - Added caveat to document 
    25 
    360.06  Wed Jul 18 17:35:32 JST 2001 
  • Convert-RACE/trunk/README

    r44 r318  
    1313 
    1414    RACE converts strings with internationalized characters into strings of 
    15     US-ASCII that are acceptable as host name parts in current DNS host naming 
    16     usage. 
     15    US-ASCII that are acceptable as host name parts in current DNS host 
     16    naming usage. 
    1717 
    1818    See http://www.ietf.org/internet-drafts/draft-ietf-idn-race-03.txt for 
     
    2424 
    2525    to_race($utf16) 
    26         to_race() takes UTF-16 encoding and returns RACE-encoded strings such 
    27         as 'bq--aewrcsy'. 
     26        to_race() takes UTF-16 encoding and returns RACE-encoded strings 
     27        such as 'bq--aewrcsy'. 
    2828 
    2929        This function throws an exception such as 'String includes no 
    30         internationalized characters', 'String too long' and 'Invalid encoding 
    31         to compress'. Exceptions are thrown with Carp::croak(), so you can 
    32         cath 'em with eval {}; 
     30        internationalized characters', 'String too long' and 'Invalid 
     31        encoding to compress'. Exceptions are thrown with Carp::croak(), so 
     32        you can cath 'em with eval {}; 
    3333 
    3434    from_race($domain_name) 
     
    3636        string. 
    3737 
    38         This function throws an exception such as 'String not begin with bq-- 
    39         ', 'Decoded string includes no internationalized characters' and ' 
     38        This function throws an exception such as 'String not begin with bq- 
     39        -', 'Decoded string includes no internationalized characters' and ' 
    4040        Invalid format to decompress'. Exceptions are thrown with 
    4141        Carp::croak(), so you can cath 'em with eval {}; 
     
    7171      Convert::RACE->prefix_tag('xx--'); 
    7272 
    73 TODO AND CAVEATS 
    74     *   Using XS would be by far efficient. 
    75  
    76     *   No validation is done for the input UTF-16 string in to_race(). The 
    77         internet draft says checking for prohibited name parts must be done 
    78         before doing the conversion. 
     73BIG FAT CAVEAT 
     74    *   This module does NOT implement Nameprep phase. See mDNkit 
     75        (http://www.nic.ad.jp/jp/research/idn/mdnkit/download/) for complete 
     76        implementations. 
    7977 
    8078AUTHOR 
    8179    Tatsuhiko Miyagawa <miyagawa@bulknews.net>, with much help from Eugen 
    82     SAVIN <seugen@serifu.com>, Philip Newton <pne@cpan.org>, Michael J Schout 
    83     <mschout@gkg.net>. 
     80    SAVIN <seugen@serifu.com>, Philip Newton <pne@cpan.org>, Michael J 
     81    Schout <mschout@gkg.net>. 
    8482 
    8583    This library is free software; you can redistribute it and/or modify it 
    8684    under the same terms as Perl itself. 
    8785 
     86    There comes NO WARRANTY with this module. 
     87 
    8888SEE ALSO 
    89     http://www.i-d-n.net/, http://www.ietf.org/internet-drafts/draft-ietf-idn- 
    90     race-03.txt, RFC 1035, the Unicode::String manpage, the Jcode manpage, th
    91     Convert::Base32 manpage. 
     89    http://www.i-d-n.net/, http://www.ietf.org/internet-drafts/draft-ietf- 
     90    idn-race-03.txt, RFC 1035, the Unicode::String manpage, the Jcod
     91    manpage, the Convert::Base32 manpage. 
    9292 
    93 Revision history for Perl extension Convert::RACE. 
    94  
    95 0.05  Tue Mar  6 16:44:33 JST 2001 
    96         - fixed bug in case that input strings contain characters 
    97           from only 2 rows, both of which are not 0x00. 
    98           Thanks to Michael J Schout <mschout@gkg.net> 
    99  
    100 0.04  Thu Mar  1 23:03:06 JST 2001 
    101         - fixed the bug that if a character has a byte of 0x0a,  
    102           it is ignored. 
    103           Thanks to Philip Newton <pne@cpan.org> 
    104  
    105 0.02  Wed Feb 28 02:52:49 JST 2001 
    106         - fixed the bug in case that all of the upper octets are  
    107           either 0x00 or one single other value. 
    108           Thanks to Eugen SAVIN <seugen@serifu.com> 
    109  
    110 0.01  Sat Dec  9 21:01:11 2000 
    111         - original version; created by h2xs 1.19 
    112  
  • Convert-RACE/trunk/lib/Convert/RACE.pm

    r177 r318  
    99    @EXPORT = qw(to_race from_race); 
    1010 
    11     $VERSION = '0.06'; 
     11    $VERSION = '0.07'; 
    1212} 
    1313 
     
    7474 
    7575    my @unique_upper_octet = _make_uniq_upper_octet($str); 
    76     if (@unique_upper_octet > 2 || 
     76    if (@unique_upper_octet > 2 || 
    7777         (@unique_upper_octet == 2 && 
    7878          ! grep { $_ eq "\x00" } @unique_upper_octet)) { 
     
    102102        } 
    103103    } 
    104      
     104 
    105105    return $res; 
    106106} 
     
    109109sub _decompress($) { 
    110110    my $str = shift; 
    111      
     111 
    112112    # 1) 
    113113    my ($u1, $rest) = (substr($str,0,1), substr($str,1)); 
     
    193193=head1 NAME 
    194194 
    195 Convert::RACE - Conversion between Unicode and RACE  
     195Convert::RACE - Conversion between Unicode and RACE 
    196196 
    197197=head1 SYNOPSIS 
     
    281281 
    282282 
    283 =head1 TODO AND CAVEATS 
     283=head1 BIG FAT CAVEAT 
    284284 
    285285=over 4 
     
    287287=item * 
    288288 
    289 Using XS would be by far efficient. 
    290  
    291 =item * 
    292  
    293 No validation is done for the input UTF-16 string in to_race(). The 
    294 internet draft says checking for prohibited name parts must be done 
    295 before doing the conversion. 
     289This module does B<NOT> implement Nameprep phase. See mDNkit 
     290(http://www.nic.ad.jp/jp/research/idn/mdnkit/download/) for complete 
     291implementations. 
    296292 
    297293=back 
     
    306302modify it under the same terms as Perl itself. 
    307303 
     304There comes B<NO WARRANTY> with this module. 
     305 
    308306=head1 SEE ALSO 
    309307