⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlebcdic.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 3 页
字号:
=head1 NAMEperlebcdic - Considerations for running Perl on EBCDIC platforms=head1 DESCRIPTIONAn exploration of some of the issues facing Perl programmerson EBCDIC based computers.  We do not cover localization, internationalization, or multi byte character set issues (yet).Portions that are still incomplete are marked with XXX.=head1 COMMON CHARACTER CODE SETS=head2 ASCIIThe American Standard Code for Information Interchange is a set ofintegers running from 0 to 127 (decimal) that imply character interpretation by the display and other system(s) of computers.  The range 0..127 can be covered by setting the bits in a 7-bit binary digit, hence the set is sometimes referred to as a "7-bit ASCII".  ASCII was described by the American National Standards Institute document ANSI X3.4-1986.  It was also described by ISO 646:1991 (with localization for currency symbols).  The full ASCII set is given in the table below as the first 128 elements.  Languages that can be written adequately with the characters in ASCII include English, Hawaiian, Indonesian, Swahili and some Native American languages.There are many character sets that extend the range of integersfrom 0..2**7-1 up to 2**8-1, or 8 bit bytes (octets if you prefer).One common one is the ISO 8859-1 character set.=head2 ISO 8859The ISO 8859-$n are a collection of character code sets from the International Organization for Standardization (ISO) each of which adds characters to the ASCII set that are typically found in European languages many of which are based on the Roman, or Latin, alphabet.=head2 Latin 1 (ISO 8859-1)A particular 8-bit extension to ASCII that includes grave and acute accented Latin characters.  Languages that can employ ISO 8859-1 include all the languages covered by ASCII as well as Afrikaans, Albanian, Basque, Catalan, Danish, Faroese, Finnish, Norwegian, Portugese, Spanish, and Swedish.  Dutch is covered albeit without the ij ligature.  French is covered too but without the oe ligature. German can use ISO 8859-1 but must do so without German-stylequotation marks.  This set is based on Western European extensions to ASCII and is commonly encountered in world wide web work.In IBM character code set identification terminology ISO 8859-1 isalso known as CCSID 819 (or sometimes 0819 or even 00819).=head2 EBCDICThe Extended Binary Coded Decimal Interchange Code  refers to a large collection of slightly different single and multi byte coded character sets that are different from ASCII or ISO 8859-1 and typically run on host computers.  The EBCDIC encodings derive from 8 bit byte extensions of Hollerith punched card encodings.The layout on the cards was such that high bits were set for theupper and lower case alphabet characters [a-z] and [A-Z], but therewere gaps within each latin alphabet range.Some IBM EBCDIC character sets may be known by character code set identification numbers (CCSID numbers) or code page numbers.  Leadingzero digits in CCSID numbers within this document are insignificant.E.g. CCSID 0037 may be referred to as 37 in places.=head2 13 variant charactersAmong IBM EBCDIC character code sets there are 13 characters thatare often mapped to different integer values.  Those charactersare known as the 13 "variant" characters and are:    \ [ ] { } ^ ~ ! # | $ @ ` =head2 0037Character code set ID 0037 is a mapping of the ASCII plus Latin-1 characters (i.e. ISO 8859-1) to an EBCDIC set.  0037 is used in North American English locales on the OS/400 operating system that runs on AS/400 computers.  CCSID 37 differs from ISO 8859-1 in 237 places, in other words they agree on only 19 code point values.=head2 1047Character code set ID 1047 is also a mapping of the ASCII plus Latin-1 characters (i.e. ISO 8859-1) to an EBCDIC set.  1047 is used under Unix System Services for OS/390, and OpenEdition for VM/ESA. CCSID 1047 differs from CCSID 0037 in eight places.=head2 POSIX-BCThe EBCDIC code page in use on Siemens' BS2000 system is distinct from1047 and 0037.  It is identified below as the POSIX-BC set.=head1 SINGLE OCTET TABLESThe following tables list the ASCII and Latin 1 ordered sets includingthe subsets: C0 controls (0..31), ASCII graphics (32..7e), delete (7f),C1 controls (80..9f), and Latin-1 (a.k.a. ISO 8859-1) (a0..ff).  In the table non-printing control character names as well as the Latin 1 extensions to ASCII have been labelled with character names roughly corresponding to I<The Unicode Standard, Version 2.0> albeit with substitutions such as s/LATIN// and s/VULGAR// in all cases, s/CAPITAL LETTER// in some cases, and s/SMALL LETTER ([A-Z])/\l$1/ in some other cases (the C<charnames> pragma names unfortunately do not list explicit names for the C0 or C1 control characters).  The "names" of the C1 control set (128..159 in ISO 8859-1) listed here are somewhat arbitrary.  The differences between the 0037 and 1047 sets are flagged with ***.  The differences between the 1047 and POSIX-BC sets are flagged with ###.  All ord() numbers listed are decimal.  If you would rather see this table listing octal values then run the table (that is, the pod version of this document since this recipe may not work with a pod2_other_format translation) through:=over 4=item recipe 0=back    perl -ne 'if(/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)' \     -e '{printf("%s%-9o%-9o%-9o%-9o\n",$1,$2,$3,$4,$5)}' perlebcdic.podIf you would rather see this table listing hexadecimal values thenrun the table through:=over 4=item recipe 1=back    perl -ne 'if(/(.{33})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)' \     -e '{printf("%s%-9X%-9X%-9X%-9X\n",$1,$2,$3,$4,$5)}' perlebcdic.pod                                 8859-1    chr                          0819     0037     1047     POSIX-BC    ----------------------------------------------------------------    <NULL>                       0        0        0        0     <START OF HEADING>           1        1        1        1    <START OF TEXT>              2        2        2        2    <END OF TEXT>                3        3        3        3    <END OF TRANSMISSION>        4        55       55       55    <ENQUIRY>                    5        45       45       45    <ACKNOWLEDGE>                6        46       46       46    <BELL>                       7        47       47       47    <BACKSPACE>                  8        22       22       22    <HORIZONTAL TABULATION>      9        5        5        5    <LINE FEED>                  10       37       21       21  ***    <VERTICAL TABULATION>        11       11       11       11    <FORM FEED>                  12       12       12       12    <CARRIAGE RETURN>            13       13       13       13    <SHIFT OUT>                  14       14       14       14    <SHIFT IN>                   15       15       15       15    <DATA LINK ESCAPE>           16       16       16       16    <DEVICE CONTROL ONE>         17       17       17       17    <DEVICE CONTROL TWO>         18       18       18       18    <DEVICE CONTROL THREE>       19       19       19       19    <DEVICE CONTROL FOUR>        20       60       60       60    <NEGATIVE ACKNOWLEDGE>       21       61       61       61    <SYNCHRONOUS IDLE>           22       50       50       50    <END OF TRANSMISSION BLOCK>  23       38       38       38    <CANCEL>                     24       24       24       24    <END OF MEDIUM>              25       25       25       25    <SUBSTITUTE>                 26       63       63       63    <ESCAPE>                     27       39       39       39    <FILE SEPARATOR>             28       28       28       28    <GROUP SEPARATOR>            29       29       29       29    <RECORD SEPARATOR>           30       30       30       30    <UNIT SEPARATOR>             31       31       31       31    <SPACE>                      32       64       64       64    !                            33       90       90       90    "                            34       127      127      127    #                            35       123      123      123    $                            36       91       91       91    %                            37       108      108      108    &                            38       80       80       80    '                            39       125      125      125    (                            40       77       77       77    )                            41       93       93       93    *                            42       92       92       92    +                            43       78       78       78    ,                            44       107      107      107    -                            45       96       96       96    .                            46       75       75       75    /                            47       97       97       97    0                            48       240      240      240    1                            49       241      241      241    2                            50       242      242      242    3                            51       243      243      243    4                            52       244      244      244    5                            53       245      245      245    6                            54       246      246      246    7                            55       247      247      247    8                            56       248      248      248    9                            57       249      249      249    :                            58       122      122      122    ;                            59       94       94       94    <                            60       76       76       76    =                            61       126      126      126    >                            62       110      110      110    ?                            63       111      111      111    @                            64       124      124      124    A                            65       193      193      193    B                            66       194      194      194    C                            67       195      195      195    D                            68       196      196      196    E                            69       197      197      197    F                            70       198      198      198    G                            71       199      199      199    H                            72       200      200      200    I                            73       201      201      201    J                            74       209      209      209    K                            75       210      210      210    L                            76       211      211      211    M                            77       212      212      212    N                            78       213      213      213    O                            79       214      214      214    P                            80       215      215      215    Q                            81       216      216      216    R                            82       217      217      217    S                            83       226      226      226    T                            84       227      227      227    U                            85       228      228      228    V                            86       229      229      229    W                            87       230      230      230    X                            88       231      231      231    Y                            89       232      232      232    Z                            90       233      233      233    [                            91       186      173      187 *** ###    \                            92       224      224      188 ###     ]                            93       187      189      189 ***    ^                            94       176      95       106 *** ###    _                            95       109      109      109    `                            96       121      121      74  ###    a                            97       129      129      129    b                            98       130      130      130    c                            99       131      131      131    d                            100      132      132      132    e                            101      133      133      133    f                            102      134      134      134    g                            103      135      135      135    h                            104      136      136      136    i                            105      137      137      137    j                            106      145      145      145    k                            107      146      146      146    l                            108      147      147      147    m                            109      148      148      148    n                            110      149      149      149    o                            111      150      150      150    p                            112      151      151      151    q                            113      152      152      152    r                            114      153      153      153    s                            115      162      162      162    t                            116      163      163      163    u                            117      164      164      164    v                            118      165      165      165    w                            119      166      166      166    x                            120      167      167      167    y                            121      168      168      168    z                            122      169      169      169    {                            123      192      192      251 ###    |                            124      79       79       79    }                            125      208      208      253 ###    ~                            126      161      161      255 ###    <DELETE>                     127      7        7        7    <C1 0>                       128      32       32       32    <C1 1>                       129      33       33       33    <C1 2>                       130      34       34       34    <C1 3>                       131      35       35       35    <C1 4>                       132      36       36       36    <C1 5>                       133      21       37       37  ***    <C1 6>                       134      6        6        6

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -