intl/chardet/tools/gencp1252.pl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #!/usr/local/bin/perl
michael@0 2 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5
michael@0 6 use strict;
michael@0 7 require "genverifier.pm";
michael@0 8 use genverifier;
michael@0 9
michael@0 10
michael@0 11 my(@cp1252_cls);
michael@0 12 my(@cp1252_st);
michael@0 13 my($cp1252_ver);
michael@0 14
michael@0 15
michael@0 16 @cp1252_cls = (
michael@0 17 [ 0x00 , 0x00 , 1 ],
michael@0 18 [ 0x0e , 0x0f , 0 ],
michael@0 19 [ 0x1b , 0x1b , 0 ],
michael@0 20 [ 0x81 , 0x81 , 0 ],
michael@0 21 [ 0x8d , 0x8d , 0 ],
michael@0 22 [ 0x8f , 0x8f , 0 ],
michael@0 23 [ 0x90 , 0x90 , 0 ],
michael@0 24 [ 0x9d , 0x9d , 0 ],
michael@0 25 [ 0xc0 , 0xd6 , 1 ],
michael@0 26 [ 0xd8 , 0xf6 , 1 ],
michael@0 27 [ 0xf8 , 0xff , 1 ],
michael@0 28 [ 0x8a , 0x8a , 1 ],
michael@0 29 [ 0x8c , 0x8c , 1 ],
michael@0 30 [ 0x8e , 0x8e , 1 ],
michael@0 31 [ 0x9a , 0x9a , 1 ],
michael@0 32 [ 0x9c , 0x9c , 1 ],
michael@0 33 [ 0x9e , 0x9e , 1 ],
michael@0 34 [ 0x9f , 0x9f , 1 ],
michael@0 35 [ 0x00 , 0xff , 2 ],
michael@0 36 );
michael@0 37
michael@0 38 package genverifier;
michael@0 39 @cp1252_st = (
michael@0 40 # 0 1 2
michael@0 41 1, 3, 0, # Start State - 0
michael@0 42 1, 1, 1, # Error State - 1
michael@0 43 2, 2, 2, # ItsMe State - 2
michael@0 44 1, 4, 0, # State - 3
michael@0 45 1, 5, 4, # State - 4
michael@0 46 1, 1, 4, # State - 5
michael@0 47 );
michael@0 48
michael@0 49
michael@0 50 $cp1252_ver = genverifier::GenVerifier("CP1252", "windows-1252",
michael@0 51 \@cp1252_cls, 3, \@cp1252_st);
michael@0 52 print $cp1252_ver;
michael@0 53
michael@0 54
michael@0 55

mercurial