intl/chardet/tools/geneuckr.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/chardet/tools/geneuckr.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +#!/usr/local/bin/perl
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +use strict;
    1.10 +require "genverifier.pm";
    1.11 +use genverifier;
    1.12 +
    1.13 +
    1.14 +my(@euckr_cls);
    1.15 +my(@euckr_st);
    1.16 +my($euckr_ver);
    1.17 +
    1.18 +
    1.19 +@euckr_cls = (
    1.20 + [ 0x00 , 0x00 , 1 ],
    1.21 + [ 0x0e , 0x0f , 0 ],
    1.22 + [ 0x1b , 0x1b , 0 ],
    1.23 + [ 0x01 , 0x7f , 1 ],
    1.24 + [ 0x80 , 0xa0 , 0 ],
    1.25 + [ 0xff , 0xff , 0 ],
    1.26 + [ 0xad , 0xaf , 3 ],
    1.27 + [ 0xc9 , 0xc9 , 3 ],
    1.28 + [ 0xa1 , 0xfe , 2 ],
    1.29 +);
    1.30 +
    1.31 +package genverifier;
    1.32 +@euckr_st = (
    1.33 +#  0  1  2  3  
    1.34 +   1, 0, 3, 1,  # state 0
    1.35 +   1, 1, 1, 1,  # Error State - 1
    1.36 +   2, 2, 2, 2,  # ItsMe State - 2
    1.37 +   1, 1, 0, 0,  # state 3
    1.38 +);
    1.39 +
    1.40 +
    1.41 +$euckr_ver = genverifier::GenVerifier("EUCKR", "EUC-KR", \@euckr_cls, 4,     \@euckr_st);
    1.42 +print $euckr_ver;
    1.43 +
    1.44 +
    1.45 +

mercurial