File: perlebcdic.html

package info (click to toggle)
perl-doc-html 5.26.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 39,400 kB
  • sloc: xml: 36; makefile: 7
file content (1284 lines) | stat: -rw-r--r-- 215,566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>perlebcdic - perldoc.perl.org</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="Content-Language" content="en-gb">
  <link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
  <link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
  <link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>

<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
    <div id="page">
      
      <div id="header">
	<div id="homepage_link">
	  <a href="index.html"></a>
	</div>
	<div id="strapline">
	  Perl Programming Documentation
	</div>
	<div id="download_link" class="download">
	  <a href="http://www.perl.org/get.html">Download Perl</a>
	</div>
	<div id="explore_link" class="download">
	  <a id="explore_anchor" href="#">Explore</a>
	</div>
      </div>
      
      <div id="body">
        <div id="left_column">
          <div class="side_group">
            
	    <div class="side_panel doc_panel">
              <p>Manual</p>
              <ul>
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">History / Changes</a>
                <li><a href="index-licence.html">License</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Reference</p>
              <ul>
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Special Variables</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platform Specific</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Modules</p>
              <ul>
		<li>
		
                
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		
                  
		
		
                    <a href="index-modules-A.html">A</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-B.html">B</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-C.html">C</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-D.html">D</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-E.html">E</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-F.html">F</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-G.html">G</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-H.html">H</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-I.html">I</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-L.html">L</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-M.html">M</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-N.html">N</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-O.html">O</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-P.html">P</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-S.html">S</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-T.html">T</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-U.html">U</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-X.html">X</a>
                    
                
              </ul>
            </div>
            
	      <div class="side_panel doc_panel">
		<p>Tools</p>
		<ul>
		  <li><a href="preferences.html">Preferences</a>
		</ul>
	      </div>
            
          </div>
        </div>
        <div id="centre_column">
          <div id="content_header">
            <div id="title_bar">
              <div id="page_name">
                <h1>perlebcdic</h1>
              </div>
              <div id="perl_version">
                Perl 5 version 26.0 documentation
              </div>
              <div class="page_links" id="page_links_top">
                <a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
		
              </div>
	      <div class="page_links" id="page_links_bottom">
		
                  <a href="#" id="page_index_toggle">Show page index</a> &bull;
		
                <a href="#" id="recent_pages_toggle">Show recent pages</a>		
	      </div>
	      <div id="search_form">
		<form action="search.html" method="GET" id="search">
		  <input type="text" name="q" id="search_box" alt="Search">
		</form>
	      </div>
            </div>
            <div id="breadcrumbs">
                
    <a href="index.html">Home</a> &gt;
    
      
        <a href="index-language.html">Language reference</a> &gt;
      
    
    perlebcdic
  

            </div>
          </div>
          <div id="content_body">
	    <!--[if lt IE 7]>
 <div class="noscript">
   <p>
     <strong>It looks like you're using Internet Explorer 6. This is a very old
     browser which does not offer full support for modern websites.</strong>
   </p>
   <p>
     Unfortunately this means that this website will not work on
     your computer.
   </p>
   <p>
     Don't miss out though! To view the site (and get a better experience from
     many other websites), simply upgrade to
     <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
     or download an alternative browser such as
     <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
     <a href="http://www.apple.com/safari/download/">Safari</a>, or
     <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
   </p>
   <p>
     All of these browsers are free. If you're using a PC at work, you may
     need to contact your IT administrator.
   </p>
 </div>
<![endif]-->
	    <noscript>
	      <div class="noscript">
	      <p>
                <strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
	        or are running a non-JavaScript capable web browser.</strong>
	      </p>
	      <p>
		To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
              </p>
	      </div>
	    </noscript>

	    <div id="recent_pages" class="hud_container">
	      <div id="recent_pages_header" class="hud_header">
		<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
		<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
		<div id="recent_pages_topright" class="hud_topright"></div>
	      </div>
	      <div id="recent_pages_content" class="hud_content">
	      </div>
	      <div id="recent_pages_footer" class="hud_footer">
		<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
		<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
		<div id="recent_pages_resize" class="hud_resize"></div>
	      </div>
	    </div>
  
	    <div id="from_search"></div>
            <h1>perlebcdic</h1>


  <!--    -->
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#COMMON-CHARACTER-CODE-SETS">COMMON CHARACTER CODE SETS</a><ul><li><a href="#ASCII">ASCII</a><li><a href="#ISO-8859">ISO 8859</a><li><a href="#Latin-1-(ISO-8859-1)">Latin 1 (ISO 8859-1)</a><li><a href="#EBCDIC">EBCDIC</a><li><a href="#Unicode-code-points-versus-EBCDIC-code-points">Unicode code points versus EBCDIC code points</a><li><a href="#Unicode-and-UTF">Unicode and UTF</a><li><a href="#Using-Encode">Using Encode</a></ul><li><a href="#SINGLE-OCTET-TABLES">SINGLE OCTET TABLES</a><ul><li><a href="#Table-in-hex%2c-sorted-in-1047-order">Table in hex, sorted in 1047 order</a></ul><li><a href="#IDENTIFYING-CHARACTER-CODE-SETS">IDENTIFYING CHARACTER CODE SETS</a><li><a href="#CONVERSIONS">CONVERSIONS</a><ul><li><a href="#utf8%3a%3aunicode_to_native()-and-utf8%3a%3anative_to_unicode()">utf8::unicode_to_native() and utf8::native_to_unicode()</a><li><a href="#tr%2f%2f%2f">tr///</a><li><a href="#iconv">iconv</a><li><a href="#C-RTL">C RTL</a></ul><li><a href="#OPERATOR-DIFFERENCES">OPERATOR DIFFERENCES</a><li><a href="#FUNCTION-DIFFERENCES">FUNCTION DIFFERENCES</a><li><a href="#REGULAR-EXPRESSION-DIFFERENCES">REGULAR EXPRESSION DIFFERENCES</a><li><a href="#SOCKETS">SOCKETS</a><li><a href="#SORTING">SORTING</a><ul><li><a href="#Ignore-ASCII-vs.-EBCDIC-sort-differences.">Ignore ASCII vs. EBCDIC sort differences.</a><li><a href="#Use-a-sort-helper-function">Use a sort helper function</a><li><a href="#MONO-CASE-then-sort-data-(for-non-digits%2c-non-underscore)">MONO CASE then sort data (for non-digits, non-underscore)</a><li><a href="#Perform-sorting-on-one-type-of-platform-only.">Perform sorting on one type of platform only.</a></ul><li><a href="#TRANSFORMATION-FORMATS">TRANSFORMATION FORMATS</a><ul><li><a href="#URL-decoding-and-encoding">URL decoding and encoding</a><li><a href="#uu-encoding-and-decoding">uu encoding and decoding</a><li><a href="#Quoted-Printable-encoding-and-decoding">Quoted-Printable encoding and decoding</a><li><a href="#Caesarean-ciphers">Caesarean ciphers</a></ul><li><a href="#Hashing-order-and-checksums">Hashing order and checksums</a><li><a href="#I18N-AND-L10N">I18N AND L10N</a><li><a href="#MULTI-OCTET-CHARACTER-SETS">MULTI-OCTET CHARACTER SETS</a><li><a href="#OS-ISSUES">OS ISSUES</a><ul><li><a href="#OS%2f400">OS/400</a><li><a href="#OS%2f390%2c-z%2fOS">OS/390, z/OS</a><li><a href="#POSIX-BC%3f">POSIX-BC?</a></ul><li><a href="#BUGS">BUGS</a><li><a href="#SEE-ALSO">SEE ALSO</a><li><a href="#REFERENCES">REFERENCES</a><li><a href="#HISTORY">HISTORY</a><li><a href="#AUTHOR">AUTHOR</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>perlebcdic - Considerations for running Perl on EBCDIC platforms</p>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>An exploration of some of the issues facing Perl programmers
on EBCDIC based computers.</p>
<p>Portions of this document that are still incomplete are marked with XXX.</p>
<p>Early Perl versions worked on some EBCDIC machines, but the last known
version that ran on EBCDIC was v5.8.7, until v5.22, when the Perl core
again works on z/OS.  Theoretically, it could work on OS/400 or Siemens'
BS2000  (or their successors), but this is untested.  In v5.22 and 5.24,
not all
the modules found on CPAN but shipped with core Perl work on z/OS.</p>
<p>If you want to use Perl on a non-z/OS EBCDIC machine, please let us know
by sending mail to perlbug@perl.org</p>
<p>Writing Perl on an EBCDIC platform is really no different than writing
on an <a href="#ASCII">ASCII</a> one, but with different underlying numbers, as we'll see
shortly.  You'll have to know something about those <a href="#ASCII">ASCII</a> platforms
because the documentation is biased and will frequently use example
numbers that don't apply to EBCDIC.  There are also very few CPAN
modules that are written for EBCDIC and which don't work on ASCII;
instead the vast majority of CPAN modules are written for ASCII, and
some may happen to work on EBCDIC, while a few have been designed to
portably work on both.</p>
<p>If your code just uses the 52 letters A-Z and a-z, plus SPACE, the
digits 0-9, and the punctuation characters that Perl uses, plus a few
controls that are denoted by escape sequences like <code class="inline">\<span class="w">n</span></code>
 and <code class="inline">\<span class="w">t</span></code>
, then
there's nothing special about using Perl, and your code may very well
work on an ASCII machine without change.</p>
<p>But if you write code that uses <code class="inline">\<span class="n">005</span></code>
 to mean a TAB or <code class="inline">\<span class="w">xC1</span></code>
 to mean
an "A", or <code class="inline">\<span class="w">xDF</span></code>
 to mean a "&#xff;" (small <code class="inline"><span class="q">&quot;y&quot;</span></code>
 with a diaeresis),
then your code may well work on your EBCDIC platform, but not on an
ASCII one.  That's fine to do if no one will ever want to run your code
on an ASCII platform; but the bias in this document will be towards writing
code portable between EBCDIC and ASCII systems.  Again, if every
character you care about is easily enterable from your keyboard, you
don't have to know anything about ASCII, but many keyboards don't easily
allow you to directly enter, say, the character <code class="inline">\<span class="w">xDF</span></code>
, so you have to
specify it indirectly, such as by using the <code class="inline"><span class="q">&quot;\xDF&quot;</span></code>
 escape sequence.
In those cases it's easiest to know something about the ASCII/Unicode
character sets.  If you know that the small "&#xff;" is <code class="inline"><span class="w">U</span>+<span class="n">00</span><span class="w">FF</span></code>
, then
you can instead specify it as <code class="inline"><span class="q">&quot;\N{U+FF}&quot;</span></code>
, and have the computer
automatically translate it to <code class="inline">\<span class="w">xDF</span></code>
 on your platform, and leave it as
<code class="inline">\<span class="w">xFF</span></code>
 on ASCII ones.  Or you could specify it by name, <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">LATIN</span>
<span class="w">SMALL</span> <span class="w">LETTER</span> <span class="w">Y</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span></code>
 and not have to know the  numbers.
Either way works, but both require familiarity with Unicode.</p>
<a name="COMMON-CHARACTER-CODE-SETS"></a><h1>COMMON CHARACTER CODE SETS</h1>
<a name="ASCII"></a><h2>ASCII</h2>
<p>The American Standard Code for Information Interchange (ASCII or
US-ASCII) is a set of
integers running from 0 to 127 (decimal) that have standardized
interpretations by the computers which use ASCII.  For example, 65 means
the letter "A".
The range 0..127 can be covered by setting various bits in a 7-bit binary
digit, hence the set is sometimes referred to as "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 <a href="#recipe-3">below</a> 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.</p>
<p>Most non-EBCDIC character sets are supersets of ASCII.  That is the
integers 0-127 mean what ASCII says they mean.  But integers 128 and
above are specific to the character set.</p>
<p>Many of these fit entirely into 8 bits, using ASCII as 0-127, while
specifying what 128-255 mean, and not using anything above 255.
Thus, these are single-byte (or octet if you prefer) character sets.
One important one (since Unicode is a superset of it) is the ISO 8859-1
character set.</p>
<a name="ISO-8859"></a><h2>ISO 8859</h2>
<p>The ISO 8859-<i><b>$n</b></i> 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 various
languages, many of which are based on the Roman, or Latin, alphabet.
Most are for European languages, but there are also ones for Arabic,
Greek, Hebrew, and Thai.  There are good references on the web about
all these.</p>
<a name="Latin-1-(ISO-8859-1)"></a><h2>Latin 1 (ISO 8859-1)</h2>
<p>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,
Portuguese, 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-style
quotation 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 is
also known as CCSID 819 (or sometimes 0819 or even 00819).</p>
<a name="EBCDIC"></a><h2>EBCDIC</h2>
<p>The Extended Binary Coded Decimal Interchange Code refers to a
large collection of single- and multi-byte coded character sets that are
quite different from ASCII and ISO 8859-1, and are all slightly
different from each other; they typically run on host computers.  The
EBCDIC encodings derive from 8-bit byte extensions of Hollerith punched
card encodings, which long predate ASCII.  The layout on the
cards was such that high bits were set for the upper and lower case
alphabetic
characters <code class="inline"><span class="s">[</span><span class="w">a</span>-z<span class="s">]</span></code>
 and <code class="inline"><span class="s">[</span><span class="w">A</span>-<span class="w">Z</span><span class="s">]</span></code>
, but there were gaps within each Latin
alphabet range, visible in the table <a href="#recipe-3">below</a>.  These gaps can
cause complications.</p>
<p>Some IBM EBCDIC character sets may be known by character code set
identification numbers (CCSID numbers) or code page numbers.</p>
<p>Perl can be compiled on platforms that run any of three commonly used EBCDIC
character sets, listed below.</p>
<a name="The-13-variant-characters"></a><h3>The 13 variant characters</h3>
<p>Among IBM EBCDIC character code sets there are 13 characters that
are often mapped to different integer values.  Those characters
are known as the 13 "variant" characters and are:</p>
<pre class="verbatim"><ol><li>    \ <span class="s">[</span> <span class="s">]</span> <span class="s">{</span> <span class="s">}</span> ^ ~ ! <span class="c"># | $ @ `</span></li></ol></pre><p>When Perl is compiled for a platform, it looks at all of these characters to
guess which EBCDIC character set the platform uses, and adapts itself
accordingly to that platform.  If the platform uses a character set that is not
one of the three Perl knows about, Perl will either fail to compile, or
mistakenly and silently choose one of the three.</p>
<a name="EBCDIC-code-sets-recognized-by-Perl"></a><h3>EBCDIC code sets recognized by Perl</h3>
<ul>
<li><a name="*0037*"></a><b><b>0037</b></b>
<p>Character 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 0037 differs from ISO 8859-1
in 236 places; in other words they agree on only 20 code point values.</p>
</li>
<li><a name="*1047*"></a><b><b>1047</b></b>
<p>Character 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 or z/OS, and OpenEdition
for VM/ESA.  CCSID 1047 differs from CCSID 0037 in eight places,
and from ISO 8859-1 in 236.</p>
</li>
<li><a name="*POSIX-BC*"></a><b><b>POSIX-BC</b></b>
<p>The EBCDIC code page in use on Siemens' BS2000 system is distinct from
1047 and 0037.  It is identified below as the POSIX-BC set.
Like 0037 and 1047, it is the same as ISO 8859-1 in 20 code point
values.</p>
</li>
</ul>
<a name="Unicode-code-points-versus-EBCDIC-code-points"></a><h2>Unicode code points versus EBCDIC code points</h2>
<p>In Unicode terminology a <i>code point</i> is the number assigned to a
character: for example, in EBCDIC the character "A" is usually assigned
the number 193.  In Unicode, the character "A" is assigned the number 65.
All the code points in ASCII and Latin-1 (ISO 8859-1) have the same
meaning in Unicode.  All three of the recognized EBCDIC code sets have
256 code points, and in each code set, all 256 code points are mapped to
equivalent Latin1 code points.  Obviously, "A" will map to "A", "B" =&gt;
"B", "%" =&gt; "%", etc., for all printable characters in Latin1 and these
code pages.</p>
<p>It also turns out that EBCDIC has nearly precise equivalents for the
ASCII/Latin1 C0 controls and the DELETE control.  (The C0 controls are
those whose ASCII code points are 0..0x1F; things like TAB, ACK, BEL,
etc.)  A mapping is set up between these ASCII/EBCDIC controls.  There
isn't such a precise mapping between the C1 controls on ASCII platforms
and the remaining EBCDIC controls.  What has been done is to map these
controls, mostly arbitrarily, to some otherwise unmatched character in
the other character set.  Most of these are very very rarely used
nowadays in EBCDIC anyway, and their names have been dropped, without
much complaint.  For example the EO (Eight Ones) EBCDIC control
(consisting of eight one bits = 0xFF) is mapped to the C1 APC control
(0x9F), and you can't use the name "EO".</p>
<p>The EBCDIC controls provide three possible line terminator characters,
CR (0x0D), LF (0x25), and NL (0x15).  On ASCII platforms, the symbols
"NL" and "LF" refer to the same character, but in strict EBCDIC
terminology they are different ones.  The EBCDIC NL is mapped to the C1
control called "NEL" ("Next Line"; here's a case where the mapping makes
quite a bit of sense, and hence isn't just arbitrary).  On some EBCDIC
platforms, this NL or NEL is the typical line terminator.  This is true
of z/OS and BS2000.  In these platforms, the C compilers will swap the
LF and NEL code points, so that <code class="inline"><span class="q">&quot;\n&quot;</span></code>
 is 0x15, and refers to NL.  Perl
does that too; you can see it in the code chart <a href="#recipe-3">below</a>.
This makes things generally "just work" without you even having to be
aware that there is a swap.</p>
<a name="Unicode-and-UTF"></a><h2>Unicode and UTF</h2>
<p>UTF stands for "Unicode Transformation Format".
UTF-8 is an encoding of Unicode into a sequence of 8-bit byte chunks, based on
ASCII and Latin-1.
The length of a sequence required to represent a Unicode code point
depends on the ordinal number of that code point,
with larger numbers requiring more bytes.
UTF-EBCDIC is like UTF-8, but based on EBCDIC.
They are enough alike that often, casual usage will conflate the two
terms, and use "UTF-8" to mean both the UTF-8 found on ASCII platforms,
and the UTF-EBCDIC found on EBCDIC ones.</p>
<p>You may see the term "invariant" character or code point.
This simply means that the character has the same numeric
value and representation when encoded in UTF-8 (or UTF-EBCDIC) as when
not.  (Note that this is a very different concept from <a href="#The-13-variant-characters">The 13 variant characters</a> mentioned above.  Careful prose will use the term "UTF-8
invariant" instead of just "invariant", but most often you'll see just
"invariant".) For example, the ordinal value of "A" is 193 in most
EBCDIC code pages, and also is 193 when encoded in UTF-EBCDIC.  All
UTF-8 (or UTF-EBCDIC) variant code points occupy at least two bytes when
encoded in UTF-8 (or UTF-EBCDIC); by definition, the UTF-8 (or
UTF-EBCDIC) invariant code points are exactly one byte whether encoded
in UTF-8 (or UTF-EBCDIC), or not.  (By now you see why people typically
just say "UTF-8" when they also mean "UTF-EBCDIC".  For the rest of this
document, we'll mostly be casual about it too.)
In ASCII UTF-8, the code points corresponding to the lowest 128
ordinal numbers (0 - 127: the ASCII characters) are invariant.
In UTF-EBCDIC, there are 160 invariant characters.
(If you care, the EBCDIC invariants are those characters
which have ASCII equivalents, plus those that correspond to
the C1 controls (128 - 159 on ASCII platforms).)</p>
<p>A string encoded in UTF-EBCDIC may be longer (very rarely shorter) than
one encoded in UTF-8.  Perl extends both UTF-8 and UTF-EBCDIC so that
they can encode code points above the Unicode maximum of U+10FFFF.  Both
extensions are constructed to allow encoding of any code point that fits
in a 64-bit word.</p>
<p>UTF-EBCDIC is defined by
<a href="http://search.cpan.org/perldoc/http:#%2fwww.unicode.org%2freports%2ftr16">Unicode Technical Report #16</a>
(often referred to as just TR16).
It is defined based on CCSID 1047, not allowing for the differences for
other code pages.  This allows for easy interchange of text between
computers running different code pages, but makes it unusable, without
adaptation, for Perl on those other code pages.</p>
<p>The reason for this unusability is that a fundamental assumption of Perl
is that the characters it cares about for parsing and lexical analysis
are the same whether or not the text is in UTF-8.  For example, Perl
expects the character <code class="inline"><span class="q">&quot;[&quot;</span></code>
 to have the same representation, no matter
if the string containing it (or program text) is UTF-8 encoded or not.
To ensure this, Perl adapts UTF-EBCDIC to the particular code page so
that all characters it expects to be UTF-8 invariant are in fact UTF-8
invariant.  This means that text generated on a computer running one
version of Perl's UTF-EBCDIC has to be translated to be intelligible to
a computer running another.</p>
<p>TR16 implies a method to extend UTF-EBCDIC to encode points up through
<code class="inline"><span class="n">2</span> ** <span class="n">31</span> - <span class="n">1</span></code>
.  Perl uses this method for code points up through
<code class="inline"><span class="n">2</span> ** <span class="n">30</span> - <span class="n">1</span></code>
, but uses an incompatible method for larger ones, to
enable it to handle much larger code points than otherwise.</p>
<a name="Using-Encode"></a><h2>Using Encode</h2>
<p>Starting from Perl 5.8 you can use the standard module Encode
to translate from EBCDIC to Latin-1 code points.
Encode knows about more EBCDIC character sets than Perl can currently
be compiled to run on.</p>
<pre class="verbatim"><ol><li>   <a class="l_k" href="functions/use.html">use</a> <span class="w">Encode</span> <span class="q">&#39;from_to&#39;</span><span class="sc">;</span></li><li></li><li>   <a class="l_k" href="functions/my.html">my</a> <span class="i">%ebcdic</span> = <span class="s">(</span> <span class="n">176</span> <span class="cm">=&gt;</span> <span class="q">&#39;cp37&#39;</span><span class="cm">,</span> <span class="n">95</span> <span class="cm">=&gt;</span> <span class="q">&#39;cp1047&#39;</span><span class="cm">,</span> <span class="n">106</span> <span class="cm">=&gt;</span> <span class="q">&#39;posix-bc&#39;</span> <span class="s">)</span><span class="sc">;</span></li><li></li><li>   <span class="c"># $a is in EBCDIC code points</span></li><li>   <span class="i">from_to</span><span class="s">(</span><span class="i">$a</span><span class="cm">,</span> <span class="i">$ebcdic</span>{<a class="l_k" href="functions/ord.html">ord</a> <span class="q">&#39;^&#39;</span>}<span class="cm">,</span> <span class="q">&#39;latin1&#39;</span><span class="s">)</span><span class="sc">;</span></li><li>   <span class="c"># $a is ISO 8859-1 code points</span></li></ol></pre><p>and from Latin-1 code points to EBCDIC code points</p>
<pre class="verbatim"><ol><li>   <a class="l_k" href="functions/use.html">use</a> <span class="w">Encode</span> <span class="q">&#39;from_to&#39;</span><span class="sc">;</span></li><li></li><li>   <a class="l_k" href="functions/my.html">my</a> <span class="i">%ebcdic</span> = <span class="s">(</span> <span class="n">176</span> <span class="cm">=&gt;</span> <span class="q">&#39;cp37&#39;</span><span class="cm">,</span> <span class="n">95</span> <span class="cm">=&gt;</span> <span class="q">&#39;cp1047&#39;</span><span class="cm">,</span> <span class="n">106</span> <span class="cm">=&gt;</span> <span class="q">&#39;posix-bc&#39;</span> <span class="s">)</span><span class="sc">;</span></li><li></li><li>   <span class="c"># $a is ISO 8859-1 code points</span></li><li>   <span class="i">from_to</span><span class="s">(</span><span class="i">$a</span><span class="cm">,</span> <span class="q">&#39;latin1&#39;</span><span class="cm">,</span> <span class="i">$ebcdic</span>{<a class="l_k" href="functions/ord.html">ord</a> <span class="q">&#39;^&#39;</span>}<span class="s">)</span><span class="sc">;</span></li><li>   <span class="c"># $a is in EBCDIC code points</span></li></ol></pre><p>For doing I/O it is suggested that you use the autotranslating features
of PerlIO, see <a href="perluniintro.html">perluniintro</a>.</p>
<p>Since version 5.8 Perl uses the PerlIO I/O library.  This enables
you to use different encodings per IO channel.  For example you may use</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">Encode</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="i">$f</span><span class="cm">,</span> <span class="q">&quot;&gt;:encoding(ascii)&quot;</span><span class="cm">,</span> <span class="q">&quot;test.ascii&quot;</span><span class="s">)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="i">$f</span> <span class="q">&quot;Hello World!\n&quot;</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="i">$f</span><span class="cm">,</span> <span class="q">&quot;&gt;:encoding(cp37)&quot;</span><span class="cm">,</span> <span class="q">&quot;test.ebcdic&quot;</span><span class="s">)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="i">$f</span> <span class="q">&quot;Hello World!\n&quot;</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="i">$f</span><span class="cm">,</span> <span class="q">&quot;&gt;:encoding(latin1)&quot;</span><span class="cm">,</span> <span class="q">&quot;test.latin1&quot;</span><span class="s">)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="i">$f</span> <span class="q">&quot;Hello World!\n&quot;</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="i">$f</span><span class="cm">,</span> <span class="q">&quot;&gt;:encoding(utf8)&quot;</span><span class="cm">,</span> <span class="q">&quot;test.utf8&quot;</span><span class="s">)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="i">$f</span> <span class="q">&quot;Hello World!\n&quot;</span><span class="sc">;</span></li></ol></pre><p>to get four files containing "Hello World!\n" in ASCII, CP 0037 EBCDIC,
ISO 8859-1 (Latin-1) (in this example identical to ASCII since only ASCII
characters were printed), and
UTF-EBCDIC (in this example identical to normal EBCDIC since only characters
that don't differ between EBCDIC and UTF-EBCDIC were printed).  See the
documentation of <a href="Encode/PerlIO.html">Encode::PerlIO</a> for details.</p>
<p>As the PerlIO layer uses raw IO (bytes) internally, all this totally
ignores things like the type of your filesystem (ASCII or EBCDIC).</p>
<a name="SINGLE-OCTET-TABLES"></a><h1>SINGLE OCTET TABLES</h1>
<p>The following tables list the ASCII and Latin 1 ordered sets including
the 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 names of the Latin 1
extensions to ASCII have been labelled with character names roughly
corresponding to <i>The Unicode Standard, Version 6.1</i> albeit with
substitutions such as <code class="inline"><a class="l_k" href="functions/s.html">s/LATIN//</a></code> and <code class="inline"><a class="l_k" href="functions/s.html">s/VULGAR//</a></code> in all cases;
<code class="inline"><span class="q">s/CAPITAL LETTER//</span></code>
 in some cases; and
<code class="inline"><span class="q">s/SMALL LETTER ([A-Z])/\l$1/</span></code>
 in some other
cases.  Controls are listed using their Unicode 6.2 abbreviations.
The differences between the 0037 and 1047 sets are
flagged with <code class="inline"><span class="i">**</span></code>
.  The differences between the 1047 and POSIX-BC sets
are flagged with <code class="inline"><span class="c">##.</span></code>
  All <code class="inline"><a class="l_k" href="functions/ord.html">ord()</a></code> numbers listed are decimal.  If you
would rather see this table listing octal values, then run the table
(that is, the pod source text of this document, since this recipe may not
work with a pod2_other_format translation) through:</p>
<ul>
<li><a name="recipe-0"></a><b>recipe 0</b>
</li>
</ul>
<pre class="verbatim"><ol><li>    <span class="w">perl</span> -<a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;if(/(.{29})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)&#39;</span> \</li><li>     -e <span class="q">&#39;{printf(&quot;%s%-5.03o%-5.03o%-5.03o%.03o\n&quot;,$1,$2,$3,$4,$5)}&#39;</span> \</li><li>     <span class="w">perlebcdic</span>.<span class="w">pod</span></li></ol></pre><p>If you want to retain the UTF-x code points then in script form you
might want to write:</p>
<ul>
<li><a name="recipe-1"></a><b>recipe 1</b>
</li>
</ul>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="w">FH</span><span class="cm">,</span><span class="q">&quot;&lt;perlebcdic.pod&quot;</span><span class="s">)</span> <a class="l_k" href="functions/or.html">or</a> <a class="l_k" href="functions/die.html">die</a> <span class="q">&quot;Could not open perlebcdic.pod: $!&quot;</span><span class="sc">;</span></li><li> <a class="l_k" href="functions/while.html">while</a> <span class="s">(</span><span class="q">&lt;FH&gt;</span><span class="s">)</span> <span class="s">{</span></li><li>     <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="q">/(.{29})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\.?(\d*)</span></li><li>                                                     <span class="q">                                                     \s+(\d+)\.?(\d*)/x</span><span class="s">)</span></li><li>     <span class="s">{</span></li><li>         <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="i">$7</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span> &amp;&amp; <span class="i">$9</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span><span class="s">)</span> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span></li><li>                <span class="q">&quot;%s%-5.03o%-5.03o%-5.03o%-5.03o%-3o.%-5o%-3o.%.03o\n&quot;</span><span class="cm">,</span></li><li>                                            <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$7</span><span class="cm">,</span><span class="i">$8</span><span class="cm">,</span><span class="i">$9</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>         <a class="l_k" href="functions/elsif.html">elsif</a> <span class="s">(</span><span class="i">$7</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span><span class="s">)</span> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%s%-5.03o%-5.03o%-5.03o%-5.03o%-3o.%-5o%.03o\n&quot;</span><span class="cm">,</span></li><li>                                           <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$7</span><span class="cm">,</span><span class="i">$8</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>         <a class="l_k" href="functions/else.html">else</a> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%s%-5.03o%-5.03o%-5.03o%-5.03o%-5.03o%.03o\n&quot;</span><span class="cm">,</span></li><li>                                                <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$8</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>     <span class="s">}</span></li><li> <span class="s">}</span></li></ol></pre><p>If you would rather see this table listing hexadecimal values then
run the table through:</p>
<ul>
<li><a name="recipe-2"></a><b>recipe 2</b>
</li>
</ul>
<pre class="verbatim"><ol><li>    <span class="w">perl</span> -<a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;if(/(.{29})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/)&#39;</span> \</li><li>     -e <span class="q">&#39;{printf(&quot;%s%-5.02X%-5.02X%-5.02X%.02X\n&quot;,$1,$2,$3,$4,$5)}&#39;</span> \</li><li>     <span class="w">perlebcdic</span>.<span class="w">pod</span></li></ol></pre><p>Or, in order to retain the UTF-x code points in hexadecimal:</p>
<ul>
<li><a name="recipe-3"></a><b>recipe 3</b>
</li>
</ul>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="w">FH</span><span class="cm">,</span><span class="q">&quot;&lt;perlebcdic.pod&quot;</span><span class="s">)</span> <a class="l_k" href="functions/or.html">or</a> <a class="l_k" href="functions/die.html">die</a> <span class="q">&quot;Could not open perlebcdic.pod: $!&quot;</span><span class="sc">;</span></li><li> <a class="l_k" href="functions/while.html">while</a> <span class="s">(</span><span class="q">&lt;FH&gt;</span><span class="s">)</span> <span class="s">{</span></li><li>     <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="q">/(.{29})(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\.?(\d*)</span></li><li>                                                     <span class="q">                                                     \s+(\d+)\.?(\d*)/x</span><span class="s">)</span></li><li>     <span class="s">{</span></li><li>         <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="i">$7</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span> &amp;&amp; <span class="i">$9</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span><span class="s">)</span> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span></li><li>                <span class="q">&quot;%s%-5.02X%-5.02X%-5.02X%-5.02X%-2X.%-6.02X%02X.%02X\n&quot;</span><span class="cm">,</span></li><li>                                           <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$7</span><span class="cm">,</span><span class="i">$8</span><span class="cm">,</span><span class="i">$9</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>         <a class="l_k" href="functions/elsif.html">elsif</a> <span class="s">(</span><span class="i">$7</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;&#39;</span><span class="s">)</span> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%s%-5.02X%-5.02X%-5.02X%-5.02X%-2X.%-6.02X%02X\n&quot;</span><span class="cm">,</span></li><li>                                              <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$7</span><span class="cm">,</span><span class="i">$8</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>         <a class="l_k" href="functions/else.html">else</a> <span class="s">{</span></li><li>             <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%s%-5.02X%-5.02X%-5.02X%-5.02X%-5.02X%02X\n&quot;</span><span class="cm">,</span></li><li>                                                  <span class="i">$1</span><span class="cm">,</span><span class="i">$2</span><span class="cm">,</span><span class="i">$3</span><span class="cm">,</span><span class="i">$4</span><span class="cm">,</span><span class="i">$5</span><span class="cm">,</span><span class="i">$6</span><span class="cm">,</span><span class="i">$8</span><span class="s">)</span><span class="sc">;</span></li><li>         <span class="s">}</span></li><li>     <span class="s">}</span></li><li> <span class="s">}</span></li><li></li><li></li><li>                          <span class="w">ISO</span></li><li>                         <span class="n">8859</span>-<span class="n">1</span>             <span class="w">POS</span>-         <span class="w">CCSID</span></li><li>                         <span class="w">CCSID</span>  <span class="w">CCSID</span> <span class="w">CCSID</span> <span class="w">IX</span>-          <span class="n">1047</span></li><li>  <a class="l_k" href="functions/chr.html">chr</a>                     <span class="n">0819</span>   <span class="n">0037</span> <span class="n">1047</span>  <span class="w">BC</span>  <span class="w">UTF</span>-<span class="n">8</span>  <span class="w">UTF</span>-<span class="w">EBCDIC</span></li><li> ---------------------------------------------------------------------</li><li> <span class="q">&lt;NUL&gt;</span>                       <span class="n">0</span>    <span class="n">0</span>    <span class="n">0</span>    <span class="n">0</span>    <span class="n">0</span>        <span class="n">0</span></li><li> &lt;<span class="w">SOH</span>&gt;                       <span class="n">1</span>    <span class="n">1</span>    <span class="n">1</span>    <span class="n">1</span>    <span class="n">1</span>        <span class="n">1</span></li><li> &lt;<span class="w">STX</span>&gt;                       <span class="n">2</span>    <span class="n">2</span>    <span class="n">2</span>    <span class="n">2</span>    <span class="n">2</span>        <span class="n">2</span></li><li> &lt;<span class="w">ETX</span>&gt;                       <span class="n">3</span>    <span class="n">3</span>    <span class="n">3</span>    <span class="n">3</span>    <span class="n">3</span>        <span class="n">3</span></li><li> &lt;<span class="w">EOT</span>&gt;                       <span class="n">4</span>    <span class="n">55</span>   <span class="n">55</span>   <span class="n">55</span>   <span class="n">4</span>        <span class="n">55</span></li><li> &lt;<span class="w">ENQ</span>&gt;                       <span class="n">5</span>    <span class="n">45</span>   <span class="n">45</span>   <span class="n">45</span>   <span class="n">5</span>        <span class="n">45</span></li><li> &lt;<span class="w">ACK</span>&gt;                       <span class="n">6</span>    <span class="n">46</span>   <span class="n">46</span>   <span class="n">46</span>   <span class="n">6</span>        <span class="n">46</span></li><li> &lt;<span class="w">BEL</span>&gt;                       <span class="n">7</span>    <span class="n">47</span>   <span class="n">47</span>   <span class="n">47</span>   <span class="n">7</span>        <span class="n">47</span></li><li> &lt;<span class="w">BS</span>&gt;                        <span class="n">8</span>    <span class="n">22</span>   <span class="n">22</span>   <span class="n">22</span>   <span class="n">8</span>        <span class="n">22</span></li><li> &lt;<span class="w">HT</span>&gt;                        <span class="n">9</span>    <span class="n">5</span>    <span class="n">5</span>    <span class="n">5</span>    <span class="n">9</span>        <span class="n">5</span></li><li> &lt;<span class="w">LF</span>&gt;                        <span class="n">10</span>   <span class="n">37</span>   <span class="n">21</span>   <span class="n">21</span>   <span class="n">10</span>       <span class="n">21</span>  **</li><li> <span class="q">&lt;VT&gt;</span>                        <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>       <span class="n">11</span></li><li> &lt;<span class="w">FF</span>&gt;                        <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>       <span class="n">12</span></li><li> &lt;<span class="w">CR</span>&gt;                        <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>       <span class="n">13</span></li><li> &lt;<span class="w">SO</span>&gt;                        <span class="n">14</span>   <span class="n">14</span>   <span class="n">14</span>   <span class="n">14</span>   <span class="n">14</span>       <span class="n">14</span></li><li> &lt;<span class="w">SI</span>&gt;                        <span class="n">15</span>   <span class="n">15</span>   <span class="n">15</span>   <span class="n">15</span>   <span class="n">15</span>       <span class="n">15</span></li><li> &lt;<span class="w">DLE</span>&gt;                       <span class="n">16</span>   <span class="n">16</span>   <span class="n">16</span>   <span class="n">16</span>   <span class="n">16</span>       <span class="n">16</span></li><li> &lt;<span class="w">DC1</span>&gt;                       <span class="n">17</span>   <span class="n">17</span>   <span class="n">17</span>   <span class="n">17</span>   <span class="n">17</span>       <span class="n">17</span></li><li> &lt;<span class="w">DC2</span>&gt;                       <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>       <span class="n">18</span></li><li> &lt;<span class="w">DC3</span>&gt;                       <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>       <span class="n">19</span></li><li> &lt;<span class="w">DC4</span>&gt;                       <span class="n">20</span>   <span class="n">60</span>   <span class="n">60</span>   <span class="n">60</span>   <span class="n">20</span>       <span class="n">60</span></li><li> &lt;<span class="w">NAK</span>&gt;                       <span class="n">21</span>   <span class="n">61</span>   <span class="n">61</span>   <span class="n">61</span>   <span class="n">21</span>       <span class="n">61</span></li><li> &lt;<span class="w">SYN</span>&gt;                       <span class="n">22</span>   <span class="n">50</span>   <span class="n">50</span>   <span class="n">50</span>   <span class="n">22</span>       <span class="n">50</span></li><li> &lt;<span class="w">ETB</span>&gt;                       <span class="n">23</span>   <span class="n">38</span>   <span class="n">38</span>   <span class="n">38</span>   <span class="n">23</span>       <span class="n">38</span></li><li> &lt;<span class="w">CAN</span>&gt;                       <span class="n">24</span>   <span class="n">24</span>   <span class="n">24</span>   <span class="n">24</span>   <span class="n">24</span>       <span class="n">24</span></li><li> &lt;<span class="w">EOM</span>&gt;                       <span class="n">25</span>   <span class="n">25</span>   <span class="n">25</span>   <span class="n">25</span>   <span class="n">25</span>       <span class="n">25</span></li><li> &lt;<span class="w">SUB</span>&gt;                       <span class="n">26</span>   <span class="n">63</span>   <span class="n">63</span>   <span class="n">63</span>   <span class="n">26</span>       <span class="n">63</span></li><li> &lt;<span class="w">ESC</span>&gt;                       <span class="n">27</span>   <span class="n">39</span>   <span class="n">39</span>   <span class="n">39</span>   <span class="n">27</span>       <span class="n">39</span></li><li> &lt;<span class="w">FS</span>&gt;                        <span class="n">28</span>   <span class="n">28</span>   <span class="n">28</span>   <span class="n">28</span>   <span class="n">28</span>       <span class="n">28</span></li><li> &lt;<span class="w">GS</span>&gt;                        <span class="n">29</span>   <span class="n">29</span>   <span class="n">29</span>   <span class="n">29</span>   <span class="n">29</span>       <span class="n">29</span></li><li> &lt;<span class="w">RS</span>&gt;                        <span class="n">30</span>   <span class="n">30</span>   <span class="n">30</span>   <span class="n">30</span>   <span class="n">30</span>       <span class="n">30</span></li><li> &lt;<span class="w">US</span>&gt;                        <span class="n">31</span>   <span class="n">31</span>   <span class="n">31</span>   <span class="n">31</span>   <span class="n">31</span>       <span class="n">31</span></li><li> &lt;<span class="w">SPACE</span>&gt;                     <span class="n">32</span>   <span class="n">64</span>   <span class="n">64</span>   <span class="n">64</span>   <span class="n">32</span>       <span class="n">64</span></li><li> !                           <span class="n">33</span>   <span class="n">90</span>   <span class="n">90</span>   <span class="n">90</span>   <span class="n">33</span>       <span class="n">90</span></li><li> <span class="q">&quot;                           34   127  127  127  34       127</span></li><li> <span class="q"> #                           35   123  123  123  35       123</span></li><li> <span class="q"> $                           36   91   91   91   36       91</span></li><li> <span class="q"> %                           37   108  108  108  37       108</span></li><li> <span class="q"> &amp;                           38   80   80   80   38       80</span></li><li> <span class="q"> &#39;                           39   125  125  125  39       125</span></li><li> <span class="q"> (                           40   77   77   77   40       77</span></li><li> <span class="q"> )                           41   93   93   93   41       93</span></li><li> <span class="q"> *                           42   92   92   92   42       92</span></li><li> <span class="q"> +                           43   78   78   78   43       78</span></li><li> <span class="q"> ,                           44   107  107  107  44       107</span></li><li> <span class="q"> -                           45   96   96   96   45       96</span></li><li> <span class="q"> .                           46   75   75   75   46       75</span></li><li> <span class="q"> /                           47   97   97   97   47       97</span></li><li> <span class="q"> 0                           48   240  240  240  48       240</span></li><li> <span class="q"> 1                           49   241  241  241  49       241</span></li><li> <span class="q"> 2                           50   242  242  242  50       242</span></li><li> <span class="q"> 3                           51   243  243  243  51       243</span></li><li> <span class="q"> 4                           52   244  244  244  52       244</span></li><li> <span class="q"> 5                           53   245  245  245  53       245</span></li><li> <span class="q"> 6                           54   246  246  246  54       246</span></li><li> <span class="q"> 7                           55   247  247  247  55       247</span></li><li> <span class="q"> 8                           56   248  248  248  56       248</span></li><li> <span class="q"> 9                           57   249  249  249  57       249</span></li><li> <span class="q"> :                           58   122  122  122  58       122</span></li><li> <span class="q"> ;                           59   94   94   94   59       94</span></li><li> <span class="q"> &lt;                           60   76   76   76   60       76</span></li><li> <span class="q"> =                           61   126  126  126  61       126</span></li><li> <span class="q"> &gt;                           62   110  110  110  62       110</span></li><li> <span class="q"> ?                           63   111  111  111  63       111</span></li><li> <span class="q"> @                           64   124  124  124  64       124</span></li><li> <span class="q"> A                           65   193  193  193  65       193</span></li><li> <span class="q"> B                           66   194  194  194  66       194</span></li><li> <span class="q"> C                           67   195  195  195  67       195</span></li><li> <span class="q"> D                           68   196  196  196  68       196</span></li><li> <span class="q"> E                           69   197  197  197  69       197</span></li><li> <span class="q"> F                           70   198  198  198  70       198</span></li><li> <span class="q"> G                           71   199  199  199  71       199</span></li><li> <span class="q"> H                           72   200  200  200  72       200</span></li><li> <span class="q"> I                           73   201  201  201  73       201</span></li><li> <span class="q"> J                           74   209  209  209  74       209</span></li><li> <span class="q"> K                           75   210  210  210  75       210</span></li><li> <span class="q"> L                           76   211  211  211  76       211</span></li><li> <span class="q"> M                           77   212  212  212  77       212</span></li><li> <span class="q"> N                           78   213  213  213  78       213</span></li><li> <span class="q"> O                           79   214  214  214  79       214</span></li><li> <span class="q"> P                           80   215  215  215  80       215</span></li><li> <span class="q"> Q                           81   216  216  216  81       216</span></li><li> <span class="q"> R                           82   217  217  217  82       217</span></li><li> <span class="q"> S                           83   226  226  226  83       226</span></li><li> <span class="q"> T                           84   227  227  227  84       227</span></li><li> <span class="q"> U                           85   228  228  228  85       228</span></li><li> <span class="q"> V                           86   229  229  229  86       229</span></li><li> <span class="q"> W                           87   230  230  230  87       230</span></li><li> <span class="q"> X                           88   231  231  231  88       231</span></li><li> <span class="q"> Y                           89   232  232  232  89       232</span></li><li> <span class="q"> Z                           90   233  233  233  90       233</span></li><li> <span class="q"> [                           91   186  173  187  91       173  ** ##</span></li><li> <span class="q"> \                           92   224  224  188  92       224  ##</span></li><li> <span class="q"> ]                           93   187  189  189  93       189  **</span></li><li> <span class="q"> ^                           94   176  95   106  94       95   ** ##</span></li><li> <span class="q"> _                           95   109  109  109  95       109</span></li><li> <span class="q"> `                           96   121  121  74   96       121  ##</span></li><li> <span class="q"> a                           97   129  129  129  97       129</span></li><li> <span class="q"> b                           98   130  130  130  98       130</span></li><li> <span class="q"> c                           99   131  131  131  99       131</span></li><li> <span class="q"> d                           100  132  132  132  100      132</span></li><li> <span class="q"> e                           101  133  133  133  101      133</span></li><li> <span class="q"> f                           102  134  134  134  102      134</span></li><li> <span class="q"> g                           103  135  135  135  103      135</span></li><li> <span class="q"> h                           104  136  136  136  104      136</span></li><li> <span class="q"> i                           105  137  137  137  105      137</span></li><li> <span class="q"> j                           106  145  145  145  106      145</span></li><li> <span class="q"> k                           107  146  146  146  107      146</span></li><li> <span class="q"> l                           108  147  147  147  108      147</span></li><li> <span class="q"> m                           109  148  148  148  109      148</span></li><li> <span class="q"> n                           110  149  149  149  110      149</span></li><li> <span class="q"> o                           111  150  150  150  111      150</span></li><li> <span class="q"> p                           112  151  151  151  112      151</span></li><li> <span class="q"> q                           113  152  152  152  113      152</span></li><li> <span class="q"> r                           114  153  153  153  114      153</span></li><li> <span class="q"> s                           115  162  162  162  115      162</span></li><li> <span class="q"> t                           116  163  163  163  116      163</span></li><li> <span class="q"> u                           117  164  164  164  117      164</span></li><li> <span class="q"> v                           118  165  165  165  118      165</span></li><li> <span class="q"> w                           119  166  166  166  119      166</span></li><li> <span class="q"> x                           120  167  167  167  120      167</span></li><li> <span class="q"> y                           121  168  168  168  121      168</span></li><li> <span class="q"> z                           122  169  169  169  122      169</span></li><li> <span class="q"> {                           123  192  192  251  123      192  ##</span></li><li> <span class="q"> |                           124  79   79   79   124      79</span></li><li> <span class="q"> }                           125  208  208  253  125      208  ##</span></li><li> <span class="q"> ~                           126  161  161  255  126      161  ##</span></li><li> <span class="q"> &lt;DEL&gt;                       127  7    7    7    127      7</span></li><li> <span class="q"> &lt;PAD&gt;                       128  32   32   32   194.128  32</span></li><li> <span class="q"> &lt;HOP&gt;                       129  33   33   33   194.129  33</span></li><li> <span class="q"> &lt;BPH&gt;                       130  34   34   34   194.130  34</span></li><li> <span class="q"> &lt;NBH&gt;                       131  35   35   35   194.131  35</span></li><li> <span class="q"> &lt;IND&gt;                       132  36   36   36   194.132  36</span></li><li> <span class="q"> &lt;NEL&gt;                       133  21   37   37   194.133  37   **</span></li><li> <span class="q"> &lt;SSA&gt;                       134  6    6    6    194.134  6</span></li><li> <span class="q"> &lt;ESA&gt;                       135  23   23   23   194.135  23</span></li><li> <span class="q"> &lt;HTS&gt;                       136  40   40   40   194.136  40</span></li><li> <span class="q"> &lt;HTJ&gt;                       137  41   41   41   194.137  41</span></li><li> <span class="q"> &lt;VTS&gt;                       138  42   42   42   194.138  42</span></li><li> <span class="q"> &lt;PLD&gt;                       139  43   43   43   194.139  43</span></li><li> <span class="q"> &lt;PLU&gt;                       140  44   44   44   194.140  44</span></li><li> <span class="q"> &lt;RI&gt;                        141  9    9    9    194.141  9</span></li><li> <span class="q"> &lt;SS2&gt;                       142  10   10   10   194.142  10</span></li><li> <span class="q"> &lt;SS3&gt;                       143  27   27   27   194.143  27</span></li><li> <span class="q"> &lt;DCS&gt;                       144  48   48   48   194.144  48</span></li><li> <span class="q"> &lt;PU1&gt;                       145  49   49   49   194.145  49</span></li><li> <span class="q"> &lt;PU2&gt;                       146  26   26   26   194.146  26</span></li><li> <span class="q"> &lt;STS&gt;                       147  51   51   51   194.147  51</span></li><li> <span class="q"> &lt;CCH&gt;                       148  52   52   52   194.148  52</span></li><li> <span class="q"> &lt;MW&gt;                        149  53   53   53   194.149  53</span></li><li> <span class="q"> &lt;SPA&gt;                       150  54   54   54   194.150  54</span></li><li> <span class="q"> &lt;EPA&gt;                       151  8    8    8    194.151  8</span></li><li> <span class="q"> &lt;SOS&gt;                       152  56   56   56   194.152  56</span></li><li> <span class="q"> &lt;SGC&gt;                       153  57   57   57   194.153  57</span></li><li> <span class="q"> &lt;SCI&gt;                       154  58   58   58   194.154  58</span></li><li> <span class="q"> &lt;CSI&gt;                       155  59   59   59   194.155  59</span></li><li> <span class="q"> &lt;ST&gt;                        156  4    4    4    194.156  4</span></li><li> <span class="q"> &lt;OSC&gt;                       157  20   20   20   194.157  20</span></li><li> <span class="q"> &lt;PM&gt;                        158  62   62   62   194.158  62</span></li><li> <span class="q"> &lt;APC&gt;                       159  255  255  95   194.159  255      ##</span></li><li> <span class="q"> &lt;NON-BREAKING SPACE&gt;        160  65   65   65   194.160  128.65</span></li><li> <span class="q"> &lt;INVERTED &quot;</span>!<span class="q">&quot; &gt;             161  170  170  170  194.161  128.66</span></li><li> <span class="q"> &lt;CENT SIGN&gt;                 162  74   74   176  194.162  128.67   ##</span></li><li> <span class="q"> &lt;POUND SIGN&gt;                163  177  177  177  194.163  128.68</span></li><li> <span class="q"> &lt;CURRENCY SIGN&gt;             164  159  159  159  194.164  128.69</span></li><li> <span class="q"> &lt;YEN SIGN&gt;                  165  178  178  178  194.165  128.70</span></li><li> <span class="q"> &lt;BROKEN BAR&gt;                166  106  106  208  194.166  128.71   ##</span></li><li> <span class="q"> &lt;SECTION SIGN&gt;              167  181  181  181  194.167  128.72</span></li><li> <span class="q"> &lt;DIAERESIS&gt;                 168  189  187  121  194.168  128.73   ** ##</span></li><li> <span class="q"> &lt;COPYRIGHT SIGN&gt;            169  180  180  180  194.169  128.74</span></li><li> <span class="q"> &lt;FEMININE ORDINAL&gt;          170  154  154  154  194.170  128.81</span></li><li> <span class="q"> &lt;LEFT POINTING GUILLEMET&gt;   171  138  138  138  194.171  128.82</span></li><li> <span class="q"> &lt;NOT SIGN&gt;                  172  95   176  186  194.172  128.83   ** ##</span></li><li> <span class="q"> &lt;SOFT HYPHEN&gt;               173  202  202  202  194.173  128.84</span></li><li> <span class="q"> &lt;REGISTERED TRADE MARK&gt;     174  175  175  175  194.174  128.85</span></li><li> <span class="q"> &lt;MACRON&gt;                    175  188  188  161  194.175  128.86   ##</span></li><li> <span class="q"> &lt;DEGREE SIGN&gt;               176  144  144  144  194.176  128.87</span></li><li> <span class="q"> &lt;PLUS-OR-MINUS SIGN&gt;        177  143  143  143  194.177  128.88</span></li><li> <span class="q"> &lt;SUPERSCRIPT TWO&gt;           178  234  234  234  194.178  128.89</span></li><li> <span class="q"> &lt;SUPERSCRIPT THREE&gt;         179  250  250  250  194.179  128.98</span></li><li> <span class="q"> &lt;ACUTE ACCENT&gt;              180  190  190  190  194.180  128.99</span></li><li> <span class="q"> &lt;MICRO SIGN&gt;                181  160  160  160  194.181  128.100</span></li><li> <span class="q"> &lt;PARAGRAPH SIGN&gt;            182  182  182  182  194.182  128.101</span></li><li> <span class="q"> &lt;MIDDLE DOT&gt;                183  179  179  179  194.183  128.102</span></li><li> <span class="q"> &lt;CEDILLA&gt;                   184  157  157  157  194.184  128.103</span></li><li> <span class="q"> &lt;SUPERSCRIPT ONE&gt;           185  218  218  218  194.185  128.104</span></li><li> <span class="q"> &lt;MASC. ORDINAL INDICATOR&gt;   186  155  155  155  194.186  128.105</span></li><li> <span class="q"> &lt;RIGHT POINTING GUILLEMET&gt;  187  139  139  139  194.187  128.106</span></li><li> <span class="q"> &lt;FRACTION ONE QUARTER&gt;      188  183  183  183  194.188  128.112</span></li><li> <span class="q"> &lt;FRACTION ONE HALF&gt;         189  184  184  184  194.189  128.113</span></li><li> <span class="q"> &lt;FRACTION THREE QUARTERS&gt;   190  185  185  185  194.190  128.114</span></li><li> <span class="q"> &lt;INVERTED QUESTION MARK&gt;    191  171  171  171  194.191  128.115</span></li><li> <span class="q"> &lt;A WITH GRAVE&gt;              192  100  100  100  195.128  138.65</span></li><li> <span class="q"> &lt;A WITH ACUTE&gt;              193  101  101  101  195.129  138.66</span></li><li> <span class="q"> &lt;A WITH CIRCUMFLEX&gt;         194  98   98   98   195.130  138.67</span></li><li> <span class="q"> &lt;A WITH TILDE&gt;              195  102  102  102  195.131  138.68</span></li><li> <span class="q"> &lt;A WITH DIAERESIS&gt;          196  99   99   99   195.132  138.69</span></li><li> <span class="q"> &lt;A WITH RING ABOVE&gt;         197  103  103  103  195.133  138.70</span></li><li> <span class="q"> &lt;CAPITAL LIGATURE AE&gt;       198  158  158  158  195.134  138.71</span></li><li> <span class="q"> &lt;C WITH CEDILLA&gt;            199  104  104  104  195.135  138.72</span></li><li> <span class="q"> &lt;E WITH GRAVE&gt;              200  116  116  116  195.136  138.73</span></li><li> <span class="q"> &lt;E WITH ACUTE&gt;              201  113  113  113  195.137  138.74</span></li><li> <span class="q"> &lt;E WITH CIRCUMFLEX&gt;         202  114  114  114  195.138  138.81</span></li><li> <span class="q"> &lt;E WITH DIAERESIS&gt;          203  115  115  115  195.139  138.82</span></li><li> <span class="q"> &lt;I WITH GRAVE&gt;              204  120  120  120  195.140  138.83</span></li><li> <span class="q"> &lt;I WITH ACUTE&gt;              205  117  117  117  195.141  138.84</span></li><li> <span class="q"> &lt;I WITH CIRCUMFLEX&gt;         206  118  118  118  195.142  138.85</span></li><li> <span class="q"> &lt;I WITH DIAERESIS&gt;          207  119  119  119  195.143  138.86</span></li><li> <span class="q"> &lt;CAPITAL LETTER ETH&gt;        208  172  172  172  195.144  138.87</span></li><li> <span class="q"> &lt;N WITH TILDE&gt;              209  105  105  105  195.145  138.88</span></li><li> <span class="q"> &lt;O WITH GRAVE&gt;              210  237  237  237  195.146  138.89</span></li><li> <span class="q"> &lt;O WITH ACUTE&gt;              211  238  238  238  195.147  138.98</span></li><li> <span class="q"> &lt;O WITH CIRCUMFLEX&gt;         212  235  235  235  195.148  138.99</span></li><li> <span class="q"> &lt;O WITH TILDE&gt;              213  239  239  239  195.149  138.100</span></li><li> <span class="q"> &lt;O WITH DIAERESIS&gt;          214  236  236  236  195.150  138.101</span></li><li> <span class="q"> &lt;MULTIPLICATION SIGN&gt;       215  191  191  191  195.151  138.102</span></li><li> <span class="q"> &lt;O WITH STROKE&gt;             216  128  128  128  195.152  138.103</span></li><li> <span class="q"> &lt;U WITH GRAVE&gt;              217  253  253  224  195.153  138.104  ##</span></li><li> <span class="q"> &lt;U WITH ACUTE&gt;              218  254  254  254  195.154  138.105</span></li><li> <span class="q"> &lt;U WITH CIRCUMFLEX&gt;         219  251  251  221  195.155  138.106  ##</span></li><li> <span class="q"> &lt;U WITH DIAERESIS&gt;          220  252  252  252  195.156  138.112</span></li><li> <span class="q"> &lt;Y WITH ACUTE&gt;              221  173  186  173  195.157  138.113  ** ##</span></li><li> <span class="q"> &lt;CAPITAL LETTER THORN&gt;      222  174  174  174  195.158  138.114</span></li><li> <span class="q"> &lt;SMALL LETTER SHARP S&gt;      223  89   89   89   195.159  138.115</span></li><li> <span class="q"> &lt;a WITH GRAVE&gt;              224  68   68   68   195.160  139.65</span></li><li> <span class="q"> &lt;a WITH ACUTE&gt;              225  69   69   69   195.161  139.66</span></li><li> <span class="q"> &lt;a WITH CIRCUMFLEX&gt;         226  66   66   66   195.162  139.67</span></li><li> <span class="q"> &lt;a WITH TILDE&gt;              227  70   70   70   195.163  139.68</span></li><li> <span class="q"> &lt;a WITH DIAERESIS&gt;          228  67   67   67   195.164  139.69</span></li><li> <span class="q"> &lt;a WITH RING ABOVE&gt;         229  71   71   71   195.165  139.70</span></li><li> <span class="q"> &lt;SMALL LIGATURE ae&gt;         230  156  156  156  195.166  139.71</span></li><li> <span class="q"> &lt;c WITH CEDILLA&gt;            231  72   72   72   195.167  139.72</span></li><li> <span class="q"> &lt;e WITH GRAVE&gt;              232  84   84   84   195.168  139.73</span></li><li> <span class="q"> &lt;e WITH ACUTE&gt;              233  81   81   81   195.169  139.74</span></li><li> <span class="q"> &lt;e WITH CIRCUMFLEX&gt;         234  82   82   82   195.170  139.81</span></li><li> <span class="q"> &lt;e WITH DIAERESIS&gt;          235  83   83   83   195.171  139.82</span></li><li> <span class="q"> &lt;i WITH GRAVE&gt;              236  88   88   88   195.172  139.83</span></li><li> <span class="q"> &lt;i WITH ACUTE&gt;              237  85   85   85   195.173  139.84</span></li><li> <span class="q"> &lt;i WITH CIRCUMFLEX&gt;         238  86   86   86   195.174  139.85</span></li><li> <span class="q"> &lt;i WITH DIAERESIS&gt;          239  87   87   87   195.175  139.86</span></li><li> <span class="q"> &lt;SMALL LETTER eth&gt;          240  140  140  140  195.176  139.87</span></li><li> <span class="q"> &lt;n WITH TILDE&gt;              241  73   73   73   195.177  139.88</span></li><li> <span class="q"> &lt;o WITH GRAVE&gt;              242  205  205  205  195.178  139.89</span></li><li> <span class="q"> &lt;o WITH ACUTE&gt;              243  206  206  206  195.179  139.98</span></li><li> <span class="q"> &lt;o WITH CIRCUMFLEX&gt;         244  203  203  203  195.180  139.99</span></li><li> <span class="q"> &lt;o WITH TILDE&gt;              245  207  207  207  195.181  139.100</span></li><li> <span class="q"> &lt;o WITH DIAERESIS&gt;          246  204  204  204  195.182  139.101</span></li><li> <span class="q"> &lt;DIVISION SIGN&gt;             247  225  225  225  195.183  139.102</span></li><li> <span class="q"> &lt;o WITH STROKE&gt;             248  112  112  112  195.184  139.103</span></li><li> <span class="q"> &lt;u WITH GRAVE&gt;              249  221  221  192  195.185  139.104  ##</span></li><li> <span class="q"> &lt;u WITH ACUTE&gt;              250  222  222  222  195.186  139.105</span></li><li> <span class="q"> &lt;u WITH CIRCUMFLEX&gt;         251  219  219  219  195.187  139.106</span></li><li> <span class="q"> &lt;u WITH DIAERESIS&gt;          252  220  220  220  195.188  139.112</span></li><li> <span class="q"> &lt;y WITH ACUTE&gt;              253  141  141  141  195.189  139.113</span></li><li> <span class="q"> &lt;SMALL LETTER thorn&gt;        254  142  142  142  195.190  139.114</span></li><li> <span class="q"> &lt;y WITH DIAERESIS&gt;          255  223  223  223  195.191  139.115</span></li></ol></pre><p>If you would rather see the above table in CCSID 0037 order rather than
ASCII + Latin-1 order then run the table through:</p>
<ul>
<li><a name="recipe-4"></a><b>recipe 4</b>
</li>
</ul>
<pre class="verbatim"><ol><li> <span class="w">perl</span> \</li><li>    -<a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;if(/.{29}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}/)&#39;</span>\</li><li>     -e <span class="q">&#39;{push(@l,$_)}&#39;</span> \</li><li>     -e <span class="q">&#39;END{print map{$_-&gt;[0]}&#39;</span> \</li><li>     -e <span class="q">&#39;          sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}&#39;</span> \</li><li>     -e <span class="q">&#39;          map{[$_,substr($_,34,3)]}@l;}&#39;</span> <span class="w">perlebcdic</span>.<span class="w">pod</span></li></ol></pre><p>If you would rather see it in CCSID 1047 order then change the number
34 in the last line to 39, like this:</p>
<ul>
<li><a name="recipe-5"></a><b>recipe 5</b>
</li>
</ul>
<pre class="verbatim"><ol><li> <span class="w">perl</span> \</li><li>    -<a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;if(/.{29}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}/)&#39;</span>\</li><li>    -e <span class="q">&#39;{push(@l,$_)}&#39;</span> \</li><li>    -e <span class="q">&#39;END{print map{$_-&gt;[0]}&#39;</span> \</li><li>    -e <span class="q">&#39;          sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}&#39;</span> \</li><li>    -e <span class="q">&#39;          map{[$_,substr($_,39,3)]}@l;}&#39;</span> <span class="w">perlebcdic</span>.<span class="w">pod</span></li></ol></pre><p>If you would rather see it in POSIX-BC order then change the number
34 in the last line to 44, like this:</p>
<ul>
<li><a name="recipe-6"></a><b>recipe 6</b>
</li>
</ul>
<pre class="verbatim"><ol><li> <span class="w">perl</span> \</li><li>    -<a class="l_k" href="functions/ne.html">ne</a> <span class="q">&#39;if(/.{29}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}\s{2,4}\d{1,3}/)&#39;</span>\</li><li>     -e <span class="q">&#39;{push(@l,$_)}&#39;</span> \</li><li>     -e <span class="q">&#39;END{print map{$_-&gt;[0]}&#39;</span> \</li><li>     -e <span class="q">&#39;          sort{$a-&gt;[1] &lt;=&gt; $b-&gt;[1]}&#39;</span> \</li><li>     -e <span class="q">&#39;          map{[$_,substr($_,44,3)]}@l;}&#39;</span> <span class="w">perlebcdic</span>.<span class="w">pod</span></li></ol></pre><a name="Table-in-hex%2c-sorted-in-1047-order"></a><h2>Table in hex, sorted in 1047 order</h2>
<p>Since this document was first written, the convention has become more
and more to use hexadecimal notation for code points.  To do this with
the recipes and to also sort is a multi-step process, so here, for
convenience, is the table from above, re-sorted to be in Code Page 1047
order, and using hex notation.</p>
<pre class="verbatim"><ol><li>                          <span class="w">ISO</span></li><li>                         <span class="n">8859</span>-<span class="n">1</span>             <span class="w">POS</span>-         <span class="w">CCSID</span></li><li>                         <span class="w">CCSID</span>  <span class="w">CCSID</span> <span class="w">CCSID</span> <span class="w">IX</span>-          <span class="n">1047</span></li><li>  <a class="l_k" href="functions/chr.html">chr</a>                     <span class="n">0819</span>   <span class="n">0037</span> <span class="n">1047</span>  <span class="w">BC</span>  <span class="w">UTF</span>-<span class="n">8</span>  <span class="w">UTF</span>-<span class="w">EBCDIC</span></li><li> ---------------------------------------------------------------------</li><li> <span class="q">&lt;NUL&gt;</span>                       <span class="n">00</span>   <span class="n">00</span>   <span class="n">00</span>   <span class="n">00</span>   <span class="n">00</span>       <span class="n">00</span></li><li> &lt;<span class="w">SOH</span>&gt;                       <span class="n">01</span>   <span class="n">01</span>   <span class="n">01</span>   <span class="n">01</span>   <span class="n">01</span>       <span class="n">01</span></li><li> &lt;<span class="w">STX</span>&gt;                       <span class="n">02</span>   <span class="n">02</span>   <span class="n">02</span>   <span class="n">02</span>   <span class="n">02</span>       <span class="n">02</span></li><li> &lt;<span class="w">ETX</span>&gt;                       <span class="n">03</span>   <span class="n">03</span>   <span class="n">03</span>   <span class="n">03</span>   <span class="n">03</span>       <span class="n">03</span></li><li> &lt;<span class="w">ST</span>&gt;                        <span class="n">9</span><span class="w">C</span>   <span class="n">04</span>   <span class="n">04</span>   <span class="n">04</span>   <span class="w">C2</span><span class="n">.9</span><span class="w">C</span>    <span class="n">04</span></li><li> &lt;<span class="w">HT</span>&gt;                        <span class="n">09</span>   <span class="n">05</span>   <span class="n">05</span>   <span class="n">05</span>   <span class="n">09</span>       <span class="n">05</span></li><li> &lt;<span class="w">SSA</span>&gt;                       <span class="n">86</span>   <span class="n">06</span>   <span class="n">06</span>   <span class="n">06</span>   <span class="w">C2</span><span class="n">.86</span>    <span class="n">06</span></li><li> &lt;<span class="w">DEL</span>&gt;                       <span class="n">7</span><span class="w">F</span>   <span class="n">07</span>   <span class="n">07</span>   <span class="n">07</span>   <span class="n">7</span><span class="w">F</span>       <span class="n">07</span></li><li> &lt;<span class="w">EPA</span>&gt;                       <span class="n">97</span>   <span class="n">08</span>   <span class="n">08</span>   <span class="n">08</span>   <span class="w">C2</span><span class="n">.97</span>    <span class="n">08</span></li><li> &lt;<span class="w">RI</span>&gt;                        <span class="n">8</span><span class="w">D</span>   <span class="n">09</span>   <span class="n">09</span>   <span class="n">09</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">D</span>    <span class="n">09</span></li><li> &lt;<span class="w">SS2</span>&gt;                       <span class="n">8</span><span class="w">E</span>   <span class="n">0</span><span class="w">A</span>   <span class="n">0</span><span class="w">A</span>   <span class="n">0</span><span class="w">A</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">E</span>    <span class="n">0</span><span class="w">A</span></li><li> <span class="q">&lt;VT&gt;</span>                        <span class="n">0</span><span class="w">B</span>   <span class="n">0</span><span class="w">B</span>   <span class="n">0</span><span class="w">B</span>   <span class="n">0</span><span class="w">B</span>   <span class="n">0</span><span class="w">B</span>       <span class="n">0</span><span class="w">B</span></li><li> <span class="q">&lt;FF&gt;</span>                        <span class="n">0</span><span class="w">C</span>   <span class="n">0</span><span class="w">C</span>   <span class="n">0</span><span class="w">C</span>   <span class="n">0</span><span class="w">C</span>   <span class="n">0</span><span class="w">C</span>       <span class="n">0</span><span class="w">C</span></li><li> <span class="q">&lt;CR&gt;</span>                        <span class="n">0</span><span class="w">D</span>   <span class="n">0</span><span class="w">D</span>   <span class="n">0</span><span class="w">D</span>   <span class="n">0</span><span class="w">D</span>   <span class="n">0</span><span class="w">D</span>       <span class="n">0</span><span class="w">D</span></li><li> <span class="q">&lt;SO&gt;</span>                        <span class="n">0</span><span class="w">E</span>   <span class="n">0</span><span class="w">E</span>   <span class="n">0</span><span class="w">E</span>   <span class="n">0</span><span class="w">E</span>   <span class="n">0</span><span class="w">E</span>       <span class="n">0</span><span class="w">E</span></li><li> <span class="q">&lt;SI&gt;</span>                        <span class="n">0</span><span class="w">F</span>   <span class="n">0</span><span class="w">F</span>   <span class="n">0</span><span class="w">F</span>   <span class="n">0</span><span class="w">F</span>   <span class="n">0</span><span class="w">F</span>       <span class="n">0</span><span class="w">F</span></li><li> <span class="q">&lt;DLE&gt;</span>                       <span class="n">10</span>   <span class="n">10</span>   <span class="n">10</span>   <span class="n">10</span>   <span class="n">10</span>       <span class="n">10</span></li><li> &lt;<span class="w">DC1</span>&gt;                       <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>   <span class="n">11</span>       <span class="n">11</span></li><li> &lt;<span class="w">DC2</span>&gt;                       <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>   <span class="n">12</span>       <span class="n">12</span></li><li> &lt;<span class="w">DC3</span>&gt;                       <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>   <span class="n">13</span>       <span class="n">13</span></li><li> &lt;<span class="w">OSC</span>&gt;                       <span class="n">9</span><span class="w">D</span>   <span class="n">14</span>   <span class="n">14</span>   <span class="n">14</span>   <span class="w">C2</span><span class="n">.9</span><span class="w">D</span>    <span class="n">14</span></li><li> &lt;<span class="w">LF</span>&gt;                        <span class="n">0</span><span class="w">A</span>   <span class="n">25</span>   <span class="n">15</span>   <span class="n">15</span>   <span class="n">0</span><span class="w">A</span>       <span class="n">15</span>    **</li><li> <span class="q">&lt;BS&gt;</span>                        <span class="n">08</span>   <span class="n">16</span>   <span class="n">16</span>   <span class="n">16</span>   <span class="n">08</span>       <span class="n">16</span></li><li> &lt;<span class="w">ESA</span>&gt;                       <span class="n">87</span>   <span class="n">17</span>   <span class="n">17</span>   <span class="n">17</span>   <span class="w">C2</span><span class="n">.87</span>    <span class="n">17</span></li><li> &lt;<span class="w">CAN</span>&gt;                       <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>   <span class="n">18</span>       <span class="n">18</span></li><li> &lt;<span class="w">EOM</span>&gt;                       <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>   <span class="n">19</span>       <span class="n">19</span></li><li> &lt;<span class="w">PU2</span>&gt;                       <span class="n">92</span>   <span class="n">1</span><span class="w">A</span>   <span class="n">1</span><span class="w">A</span>   <span class="n">1</span><span class="w">A</span>   <span class="w">C2</span><span class="n">.92</span>    <span class="n">1</span><span class="w">A</span></li><li> <span class="q">&lt;SS3&gt;</span>                       <span class="n">8</span><span class="w">F</span>   <span class="n">1</span><span class="w">B</span>   <span class="n">1</span><span class="w">B</span>   <span class="n">1</span><span class="w">B</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">F</span>    <span class="n">1</span><span class="w">B</span></li><li> <span class="q">&lt;FS&gt;</span>                        <span class="n">1</span><span class="w">C</span>   <span class="n">1</span><span class="w">C</span>   <span class="n">1</span><span class="w">C</span>   <span class="n">1</span><span class="w">C</span>   <span class="n">1</span><span class="w">C</span>       <span class="n">1</span><span class="w">C</span></li><li> <span class="q">&lt;GS&gt;</span>                        <span class="n">1</span><span class="w">D</span>   <span class="n">1</span><span class="w">D</span>   <span class="n">1</span><span class="w">D</span>   <span class="n">1</span><span class="w">D</span>   <span class="n">1</span><span class="w">D</span>       <span class="n">1</span><span class="w">D</span></li><li> <span class="q">&lt;RS&gt;</span>                        <span class="n">1</span><span class="w">E</span>   <span class="n">1</span><span class="w">E</span>   <span class="n">1</span><span class="w">E</span>   <span class="n">1</span><span class="w">E</span>   <span class="n">1</span><span class="w">E</span>       <span class="n">1</span><span class="w">E</span></li><li> <span class="q">&lt;US&gt;</span>                        <span class="n">1</span><span class="w">F</span>   <span class="n">1</span><span class="w">F</span>   <span class="n">1</span><span class="w">F</span>   <span class="n">1</span><span class="w">F</span>   <span class="n">1</span><span class="w">F</span>       <span class="n">1</span><span class="w">F</span></li><li> <span class="q">&lt;PAD&gt;</span>                       <span class="n">80</span>   <span class="n">20</span>   <span class="n">20</span>   <span class="n">20</span>   <span class="w">C2</span><span class="n">.80</span>    <span class="n">20</span></li><li> &lt;<span class="w">HOP</span>&gt;                       <span class="n">81</span>   <span class="n">21</span>   <span class="n">21</span>   <span class="n">21</span>   <span class="w">C2</span><span class="n">.81</span>    <span class="n">21</span></li><li> &lt;<span class="w">BPH</span>&gt;                       <span class="n">82</span>   <span class="n">22</span>   <span class="n">22</span>   <span class="n">22</span>   <span class="w">C2</span><span class="n">.82</span>    <span class="n">22</span></li><li> &lt;<span class="w">NBH</span>&gt;                       <span class="n">83</span>   <span class="n">23</span>   <span class="n">23</span>   <span class="n">23</span>   <span class="w">C2</span><span class="n">.83</span>    <span class="n">23</span></li><li> &lt;<span class="w">IND</span>&gt;                       <span class="n">84</span>   <span class="n">24</span>   <span class="n">24</span>   <span class="n">24</span>   <span class="w">C2</span><span class="n">.84</span>    <span class="n">24</span></li><li> &lt;<span class="w">NEL</span>&gt;                       <span class="n">85</span>   <span class="n">15</span>   <span class="n">25</span>   <span class="n">25</span>   <span class="w">C2</span><span class="n">.85</span>    <span class="n">25</span>     **</li><li> <span class="q">&lt;ETB&gt;</span>                       <span class="n">17</span>   <span class="n">26</span>   <span class="n">26</span>   <span class="n">26</span>   <span class="n">17</span>       <span class="n">26</span></li><li> &lt;<span class="w">ESC</span>&gt;                       <span class="n">1</span><span class="w">B</span>   <span class="n">27</span>   <span class="n">27</span>   <span class="n">27</span>   <span class="n">1</span><span class="w">B</span>       <span class="n">27</span></li><li> &lt;<span class="w">HTS</span>&gt;                       <span class="n">88</span>   <span class="n">28</span>   <span class="n">28</span>   <span class="n">28</span>   <span class="w">C2</span><span class="n">.88</span>    <span class="n">28</span></li><li> &lt;<span class="w">HTJ</span>&gt;                       <span class="n">89</span>   <span class="n">29</span>   <span class="n">29</span>   <span class="n">29</span>   <span class="w">C2</span><span class="n">.89</span>    <span class="n">29</span></li><li> &lt;<span class="w">VTS</span>&gt;                       <span class="n">8</span><span class="w">A</span>   <span class="n">2</span><span class="w">A</span>   <span class="n">2</span><span class="w">A</span>   <span class="n">2</span><span class="w">A</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">A</span>    <span class="n">2</span><span class="w">A</span></li><li> <span class="q">&lt;PLD&gt;</span>                       <span class="n">8</span><span class="w">B</span>   <span class="n">2</span><span class="w">B</span>   <span class="n">2</span><span class="w">B</span>   <span class="n">2</span><span class="w">B</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">B</span>    <span class="n">2</span><span class="w">B</span></li><li> <span class="q">&lt;PLU&gt;</span>                       <span class="n">8</span><span class="w">C</span>   <span class="n">2</span><span class="w">C</span>   <span class="n">2</span><span class="w">C</span>   <span class="n">2</span><span class="w">C</span>   <span class="w">C2</span><span class="n">.8</span><span class="w">C</span>    <span class="n">2</span><span class="w">C</span></li><li> <span class="q">&lt;ENQ&gt;</span>                       <span class="n">05</span>   <span class="n">2</span><span class="w">D</span>   <span class="n">2</span><span class="w">D</span>   <span class="n">2</span><span class="w">D</span>   <span class="n">05</span>       <span class="n">2</span><span class="w">D</span></li><li> <span class="q">&lt;ACK&gt;</span>                       <span class="n">06</span>   <span class="n">2</span><span class="w">E</span>   <span class="n">2</span><span class="w">E</span>   <span class="n">2</span><span class="w">E</span>   <span class="n">06</span>       <span class="n">2</span><span class="w">E</span></li><li> <span class="q">&lt;BEL&gt;</span>                       <span class="n">07</span>   <span class="n">2</span><span class="w">F</span>   <span class="n">2</span><span class="w">F</span>   <span class="n">2</span><span class="w">F</span>   <span class="n">07</span>       <span class="n">2</span><span class="w">F</span></li><li> <span class="q">&lt;DCS&gt;</span>                       <span class="n">90</span>   <span class="n">30</span>   <span class="n">30</span>   <span class="n">30</span>   <span class="w">C2</span><span class="n">.90</span>    <span class="n">30</span></li><li> &lt;<span class="w">PU1</span>&gt;                       <span class="n">91</span>   <span class="n">31</span>   <span class="n">31</span>   <span class="n">31</span>   <span class="w">C2</span><span class="n">.91</span>    <span class="n">31</span></li><li> &lt;<span class="w">SYN</span>&gt;                       <span class="n">16</span>   <span class="n">32</span>   <span class="n">32</span>   <span class="n">32</span>   <span class="n">16</span>       <span class="n">32</span></li><li> &lt;<span class="w">STS</span>&gt;                       <span class="n">93</span>   <span class="n">33</span>   <span class="n">33</span>   <span class="n">33</span>   <span class="w">C2</span><span class="n">.93</span>    <span class="n">33</span></li><li> &lt;<span class="w">CCH</span>&gt;                       <span class="n">94</span>   <span class="n">34</span>   <span class="n">34</span>   <span class="n">34</span>   <span class="w">C2</span><span class="n">.94</span>    <span class="n">34</span></li><li> &lt;<span class="w">MW</span>&gt;                        <span class="n">95</span>   <span class="n">35</span>   <span class="n">35</span>   <span class="n">35</span>   <span class="w">C2</span><span class="n">.95</span>    <span class="n">35</span></li><li> &lt;<span class="w">SPA</span>&gt;                       <span class="n">96</span>   <span class="n">36</span>   <span class="n">36</span>   <span class="n">36</span>   <span class="w">C2</span><span class="n">.96</span>    <span class="n">36</span></li><li> &lt;<span class="w">EOT</span>&gt;                       <span class="n">04</span>   <span class="n">37</span>   <span class="n">37</span>   <span class="n">37</span>   <span class="n">04</span>       <span class="n">37</span></li><li> &lt;<span class="w">SOS</span>&gt;                       <span class="n">98</span>   <span class="n">38</span>   <span class="n">38</span>   <span class="n">38</span>   <span class="w">C2</span><span class="n">.98</span>    <span class="n">38</span></li><li> &lt;<span class="w">SGC</span>&gt;                       <span class="n">99</span>   <span class="n">39</span>   <span class="n">39</span>   <span class="n">39</span>   <span class="w">C2</span><span class="n">.99</span>    <span class="n">39</span></li><li> &lt;<span class="w">SCI</span>&gt;                       <span class="n">9</span><span class="w">A</span>   <span class="n">3</span><span class="w">A</span>   <span class="n">3</span><span class="w">A</span>   <span class="n">3</span><span class="w">A</span>   <span class="w">C2</span><span class="n">.9</span><span class="w">A</span>    <span class="n">3</span><span class="w">A</span></li><li> <span class="q">&lt;CSI&gt;</span>                       <span class="n">9</span><span class="w">B</span>   <span class="n">3</span><span class="w">B</span>   <span class="n">3</span><span class="w">B</span>   <span class="n">3</span><span class="w">B</span>   <span class="w">C2</span><span class="n">.9</span><span class="w">B</span>    <span class="n">3</span><span class="w">B</span></li><li> <span class="q">&lt;DC4&gt;</span>                       <span class="n">14</span>   <span class="n">3</span><span class="w">C</span>   <span class="n">3</span><span class="w">C</span>   <span class="n">3</span><span class="w">C</span>   <span class="n">14</span>       <span class="n">3</span><span class="w">C</span></li><li> <span class="q">&lt;NAK&gt;</span>                       <span class="n">15</span>   <span class="n">3</span><span class="w">D</span>   <span class="n">3</span><span class="w">D</span>   <span class="n">3</span><span class="w">D</span>   <span class="n">15</span>       <span class="n">3</span><span class="w">D</span></li><li> <span class="q">&lt;PM&gt;</span>                        <span class="n">9</span><span class="w">E</span>   <span class="n">3</span><span class="w">E</span>   <span class="n">3</span><span class="w">E</span>   <span class="n">3</span><span class="w">E</span>   <span class="w">C2</span><span class="n">.9</span><span class="w">E</span>    <span class="n">3</span><span class="w">E</span></li><li> <span class="q">&lt;SUB&gt;</span>                       <span class="n">1</span><span class="w">A</span>   <span class="n">3</span><span class="w">F</span>   <span class="n">3</span><span class="w">F</span>   <span class="n">3</span><span class="w">F</span>   <span class="n">1</span><span class="w">A</span>       <span class="n">3</span><span class="w">F</span></li><li> <span class="q">&lt;SPACE&gt;</span>                     <span class="n">20</span>   <span class="n">40</span>   <span class="n">40</span>   <span class="n">40</span>   <span class="n">20</span>       <span class="n">40</span></li><li> &lt;<span class="w">NON</span>-<span class="w">BREAKING</span> <span class="w">SPACE</span>&gt;        <span class="w">A0</span>   <span class="n">41</span>   <span class="n">41</span>   <span class="n">41</span>   <span class="w">C2</span>.<span class="w">A0</span>    <span class="n">80.41</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">CIRCUMFLEX</span>&gt;         <span class="w">E2</span>   <span class="n">42</span>   <span class="n">42</span>   <span class="n">42</span>   <span class="w">C3</span>.<span class="w">A2</span>    <span class="n">8</span><span class="w">B</span><span class="n">.43</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">E4</span>   <span class="n">43</span>   <span class="n">43</span>   <span class="n">43</span>   <span class="w">C3</span>.<span class="w">A4</span>    <span class="n">8</span><span class="w">B</span><span class="n">.45</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">E0</span>   <span class="n">44</span>   <span class="n">44</span>   <span class="n">44</span>   <span class="w">C3</span>.<span class="w">A0</span>    <span class="n">8</span><span class="w">B</span><span class="n">.41</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">E1</span>   <span class="n">45</span>   <span class="n">45</span>   <span class="n">45</span>   <span class="w">C3</span>.<span class="w">A1</span>    <span class="n">8</span><span class="w">B</span><span class="n">.42</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">TILDE</span>&gt;              <span class="w">E3</span>   <span class="n">46</span>   <span class="n">46</span>   <span class="n">46</span>   <span class="w">C3</span>.<span class="w">A3</span>    <span class="n">8</span><span class="w">B</span><span class="n">.44</span></li><li> &lt;<span class="w">a</span> <span class="w">WITH</span> <span class="w">RING</span> <span class="w">ABOVE</span>&gt;         <span class="w">E5</span>   <span class="n">47</span>   <span class="n">47</span>   <span class="n">47</span>   <span class="w">C3</span>.<span class="w">A5</span>    <span class="n">8</span><span class="w">B</span><span class="n">.46</span></li><li> &lt;<span class="w">c</span> <span class="w">WITH</span> <span class="w">CEDILLA</span>&gt;            <span class="w">E7</span>   <span class="n">48</span>   <span class="n">48</span>   <span class="n">48</span>   <span class="w">C3</span>.<span class="w">A7</span>    <span class="n">8</span><span class="w">B</span><span class="n">.48</span></li><li> &lt;<span class="w">n</span> <span class="w">WITH</span> <span class="w">TILDE</span>&gt;              <span class="w">F1</span>   <span class="n">49</span>   <span class="n">49</span>   <span class="n">49</span>   <span class="w">C3</span>.<span class="w">B1</span>    <span class="n">8</span><span class="w">B</span><span class="n">.58</span></li><li> &lt;<span class="w">CENT</span> <span class="w">SIGN</span>&gt;                 <span class="w">A2</span>   <span class="n">4</span><span class="w">A</span>   <span class="n">4</span><span class="w">A</span>   <span class="w">B0</span>   <span class="w">C2</span>.<span class="w">A2</span>    <span class="n">80.43</span>  <span class="c">##</span></li><li> .                           <span class="n">2</span><span class="w">E</span>   <span class="n">4</span><span class="w">B</span>   <span class="n">4</span><span class="w">B</span>   <span class="n">4</span><span class="w">B</span>   <span class="n">2</span><span class="w">E</span>       <span class="n">4</span><span class="w">B</span></li><li> &lt;                           <span class="n">3</span><span class="w">C</span>   <span class="n">4</span><span class="w">C</span>   <span class="n">4</span><span class="w">C</span>   <span class="n">4</span><span class="w">C</span>   <span class="n">3</span><span class="w">C</span>       <span class="n">4</span><span class="i">C</span></li><li> <span class="s">(</span>                           <span class="n">28</span>   <span class="n">4</span><span class="w">D</span>   <span class="n">4</span><span class="w">D</span>   <span class="n">4</span><span class="w">D</span>   <span class="n">28</span>       <span class="n">4</span><span class="w">D</span></li><li> +                           <span class="n">2</span><span class="w">B</span>   <span class="n">4</span><span class="w">E</span>   <span class="n">4</span><span class="w">E</span>   <span class="n">4</span><span class="w">E</span>   <span class="n">2</span><span class="w">B</span>       <span class="n">4</span><span class="w">E</span></li><li> |                           <span class="n">7</span><span class="w">C</span>   <span class="n">4</span><span class="w">F</span>   <span class="n">4</span><span class="w">F</span>   <span class="n">4</span><span class="w">F</span>   <span class="n">7</span><span class="w">C</span>       <span class="n">4</span><span class="w">F</span></li><li> <span class="i">&amp;                           26</span>   <span class="n">50</span>   <span class="n">50</span>   <span class="n">50</span>   <span class="n">26</span>       <span class="n">50</span></li><li> &lt;<span class="w">e</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">E9</span>   <span class="n">51</span>   <span class="n">51</span>   <span class="n">51</span>   <span class="w">C3</span>.<span class="w">A9</span>    <span class="n">8</span><span class="w">B</span><span class="n">.4</span><span class="w">A</span></li><li> <span class="q">&lt;e WITH CIRCUMFLEX&gt;</span>         <span class="w">EA</span>   <span class="n">52</span>   <span class="n">52</span>   <span class="n">52</span>   <span class="w">C3</span>.<span class="w">AA</span>    <span class="n">8</span><span class="w">B</span><span class="n">.51</span></li><li> &lt;<span class="w">e</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">EB</span>   <span class="n">53</span>   <span class="n">53</span>   <span class="n">53</span>   <span class="w">C3</span>.<span class="w">AB</span>    <span class="n">8</span><span class="w">B</span><span class="n">.52</span></li><li> &lt;<span class="w">e</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">E8</span>   <span class="n">54</span>   <span class="n">54</span>   <span class="n">54</span>   <span class="w">C3</span>.<span class="w">A8</span>    <span class="n">8</span><span class="w">B</span><span class="n">.49</span></li><li> &lt;<span class="w">i</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">ED</span>   <span class="n">55</span>   <span class="n">55</span>   <span class="n">55</span>   <span class="w">C3</span>.<span class="w">AD</span>    <span class="n">8</span><span class="w">B</span><span class="n">.54</span></li><li> &lt;<span class="w">i</span> <span class="w">WITH</span> <span class="w">CIRCUMFLEX</span>&gt;         <span class="w">EE</span>   <span class="n">56</span>   <span class="n">56</span>   <span class="n">56</span>   <span class="w">C3</span>.<span class="w">AE</span>    <span class="n">8</span><span class="w">B</span><span class="n">.55</span></li><li> &lt;<span class="w">i</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">EF</span>   <span class="n">57</span>   <span class="n">57</span>   <span class="n">57</span>   <span class="w">C3</span>.<span class="w">AF</span>    <span class="n">8</span><span class="w">B</span><span class="n">.56</span></li><li> &lt;<span class="w">i</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">EC</span>   <span class="n">58</span>   <span class="n">58</span>   <span class="n">58</span>   <span class="w">C3</span>.<span class="w">AC</span>    <span class="n">8</span><span class="w">B</span><span class="n">.53</span></li><li> &lt;<span class="w">SMALL</span> <span class="w">LETTER</span> <span class="w">SHARP</span> <span class="w">S</span>&gt;      <span class="w">DF</span>   <span class="n">59</span>   <span class="n">59</span>   <span class="n">59</span>   <span class="w">C3</span><span class="n">.9</span><span class="w">F</span>    <span class="n">8</span><span class="w">A</span><span class="n">.73</span></li><li> !                           <span class="n">21</span>   <span class="n">5</span><span class="w">A</span>   <span class="n">5</span><span class="w">A</span>   <span class="n">5</span><span class="w">A</span>   <span class="n">21</span>       <span class="n">5</span><span class="w">A</span></li><li> <span class="i">$                           24</span>   <span class="n">5</span><span class="w">B</span>   <span class="n">5</span><span class="w">B</span>   <span class="n">5</span><span class="w">B</span>   <span class="n">24</span>       <span class="n">5</span><span class="w">B</span></li><li> *                           <span class="n">2</span><span class="w">A</span>   <span class="n">5</span><span class="w">C</span>   <span class="n">5</span><span class="w">C</span>   <span class="n">5</span><span class="w">C</span>   <span class="n">2</span><span class="w">A</span>       <span class="n">5</span><span class="w">C</span></li><li> <span class="s">)</span>                           <span class="n">29</span>   <span class="n">5</span><span class="w">D</span>   <span class="n">5</span><span class="w">D</span>   <span class="n">5</span><span class="w">D</span>   <span class="n">29</span>       <span class="n">5</span><span class="w">D</span></li><li> <span class="sc">;</span>                           <span class="n">3</span><span class="w">B</span>   <span class="n">5</span><span class="w">E</span>   <span class="n">5</span><span class="w">E</span>   <span class="n">5</span><span class="w">E</span>   <span class="n">3</span><span class="w">B</span>       <span class="n">5</span><span class="w">E</span></li><li> ^                           <span class="n">5</span><span class="w">E</span>   <span class="w">B0</span>   <span class="n">5</span><span class="w">F</span>   <span class="n">6</span><span class="w">A</span>   <span class="n">5</span><span class="w">E</span>       <span class="n">5</span><span class="w">F</span>     ** <span class="c">##</span></li><li> -                           <span class="n">2</span><span class="w">D</span>   <span class="n">60</span>   <span class="n">60</span>   <span class="n">60</span>   <span class="n">2</span><span class="w">D</span>       <span class="n">60</span></li><li> /                           <span class="n">2</span><span class="w">F</span>   <span class="n">61</span>   <span class="n">61</span>   <span class="n">61</span>   <span class="n">2</span><span class="w">F</span>       <span class="n">61</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">CIRCUMFLEX</span>&gt;         <span class="w">C2</span>   <span class="n">62</span>   <span class="n">62</span>   <span class="n">62</span>   <span class="w">C3</span><span class="n">.82</span>    <span class="n">8</span><span class="w">A</span><span class="n">.43</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">C4</span>   <span class="n">63</span>   <span class="n">63</span>   <span class="n">63</span>   <span class="w">C3</span><span class="n">.84</span>    <span class="n">8</span><span class="w">A</span><span class="n">.45</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">C0</span>   <span class="n">64</span>   <span class="n">64</span>   <span class="n">64</span>   <span class="w">C3</span><span class="n">.80</span>    <span class="n">8</span><span class="w">A</span><span class="n">.41</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">C1</span>   <span class="n">65</span>   <span class="n">65</span>   <span class="n">65</span>   <span class="w">C3</span><span class="n">.81</span>    <span class="n">8</span><span class="w">A</span><span class="n">.42</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">TILDE</span>&gt;              <span class="w">C3</span>   <span class="n">66</span>   <span class="n">66</span>   <span class="n">66</span>   <span class="w">C3</span><span class="n">.83</span>    <span class="n">8</span><span class="w">A</span><span class="n">.44</span></li><li> &lt;<span class="w">A</span> <span class="w">WITH</span> <span class="w">RING</span> <span class="w">ABOVE</span>&gt;         <span class="w">C5</span>   <span class="n">67</span>   <span class="n">67</span>   <span class="n">67</span>   <span class="w">C3</span><span class="n">.85</span>    <span class="n">8</span><span class="w">A</span><span class="n">.46</span></li><li> &lt;<span class="w">C</span> <span class="w">WITH</span> <span class="w">CEDILLA</span>&gt;            <span class="w">C7</span>   <span class="n">68</span>   <span class="n">68</span>   <span class="n">68</span>   <span class="w">C3</span><span class="n">.87</span>    <span class="n">8</span><span class="w">A</span><span class="n">.48</span></li><li> &lt;<span class="w">N</span> <span class="w">WITH</span> <span class="w">TILDE</span>&gt;              <span class="w">D1</span>   <span class="n">69</span>   <span class="n">69</span>   <span class="n">69</span>   <span class="w">C3</span><span class="n">.91</span>    <span class="n">8</span><span class="w">A</span><span class="n">.58</span></li><li> &lt;<span class="w">BROKEN</span> <span class="w">BAR</span>&gt;                <span class="w">A6</span>   <span class="n">6</span><span class="w">A</span>   <span class="n">6</span><span class="w">A</span>   <span class="w">D0</span>   <span class="w">C2</span>.<span class="w">A6</span>    <span class="n">80.47</span>  <span class="c">##</span></li><li> <span class="cm">,</span>                           <span class="n">2</span><span class="w">C</span>   <span class="n">6</span><span class="w">B</span>   <span class="n">6</span><span class="w">B</span>   <span class="n">6</span><span class="w">B</span>   <span class="n">2</span><span class="w">C</span>       <span class="n">6</span><span class="w">B</span></li><li> %                           <span class="n">25</span>   <span class="n">6</span><span class="w">C</span>   <span class="n">6</span><span class="w">C</span>   <span class="n">6</span><span class="w">C</span>   <span class="n">25</span>       <span class="n">6</span><span class="w">C</span></li><li> <span class="w">_</span>                           <span class="n">5</span><span class="w">F</span>   <span class="n">6</span><span class="w">D</span>   <span class="n">6</span><span class="w">D</span>   <span class="n">6</span><span class="w">D</span>   <span class="n">5</span><span class="w">F</span>       <span class="n">6</span><span class="w">D</span></li><li> &gt;                           <span class="n">3</span><span class="w">E</span>   <span class="n">6</span><span class="w">E</span>   <span class="n">6</span><span class="w">E</span>   <span class="n">6</span><span class="w">E</span>   <span class="n">3</span><span class="w">E</span>       <span class="n">6</span><span class="w">E</span></li><li> ?                           <span class="n">3</span><span class="w">F</span>   <span class="n">6</span><span class="w">F</span>   <span class="n">6</span><span class="w">F</span>   <span class="n">6</span><span class="w">F</span>   <span class="n">3</span><span class="w">F</span>       <span class="n">6</span><span class="w">F</span></li><li> <span class="q">&lt;o WITH STROKE&gt;</span>             <span class="w">F8</span>   <span class="n">70</span>   <span class="n">70</span>   <span class="n">70</span>   <span class="w">C3</span>.<span class="w">B8</span>    <span class="n">8</span><span class="w">B</span><span class="n">.67</span></li><li> &lt;<span class="w">E</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">C9</span>   <span class="n">71</span>   <span class="n">71</span>   <span class="n">71</span>   <span class="w">C3</span><span class="n">.89</span>    <span class="n">8</span><span class="w">A</span><span class="n">.4</span><span class="w">A</span></li><li> <span class="q">&lt;E WITH CIRCUMFLEX&gt;</span>         <span class="w">CA</span>   <span class="n">72</span>   <span class="n">72</span>   <span class="n">72</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">A</span>    <span class="n">8</span><span class="w">A</span><span class="n">.51</span></li><li> &lt;<span class="w">E</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">CB</span>   <span class="n">73</span>   <span class="n">73</span>   <span class="n">73</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">B</span>    <span class="n">8</span><span class="w">A</span><span class="n">.52</span></li><li> &lt;<span class="w">E</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">C8</span>   <span class="n">74</span>   <span class="n">74</span>   <span class="n">74</span>   <span class="w">C3</span><span class="n">.88</span>    <span class="n">8</span><span class="w">A</span><span class="n">.49</span></li><li> &lt;<span class="w">I</span> <span class="w">WITH</span> <span class="w">ACUTE</span>&gt;              <span class="w">CD</span>   <span class="n">75</span>   <span class="n">75</span>   <span class="n">75</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">D</span>    <span class="n">8</span><span class="w">A</span><span class="n">.54</span></li><li> &lt;<span class="w">I</span> <span class="w">WITH</span> <span class="w">CIRCUMFLEX</span>&gt;         <span class="w">CE</span>   <span class="n">76</span>   <span class="n">76</span>   <span class="n">76</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">E</span>    <span class="n">8</span><span class="w">A</span><span class="n">.55</span></li><li> &lt;<span class="w">I</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span>&gt;          <span class="w">CF</span>   <span class="n">77</span>   <span class="n">77</span>   <span class="n">77</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">F</span>    <span class="n">8</span><span class="w">A</span><span class="n">.56</span></li><li> &lt;<span class="w">I</span> <span class="w">WITH</span> <span class="w">GRAVE</span>&gt;              <span class="w">CC</span>   <span class="n">78</span>   <span class="n">78</span>   <span class="n">78</span>   <span class="w">C3</span><span class="n">.8</span><span class="w">C</span>    <span class="n">8</span><span class="w">A</span><span class="n">.53</span></li><li> <span class="q">`                           60   79   79   4A   60       79     ##</span></li><li> <span class="q"> :                           3A   7A   7A   7A   3A       7A</span></li><li> <span class="q"> #                           23   7B   7B   7B   23       7B</span></li><li> <span class="q"> @                           40   7C   7C   7C   40       7C</span></li><li> <span class="q"> &#39;                           27   7D   7D   7D   27       7D</span></li><li> <span class="q"> =                           3D   7E   7E   7E   3D       7E</span></li><li> <span class="q"> &quot;                           22   7F   7F   7F   22       7F</span></li><li> <span class="q"> &lt;O WITH STROKE&gt;             D8   80   80   80   C3.98    8A.67</span></li><li> <span class="q"> a                           61   81   81   81   61       81</span></li><li> <span class="q"> b                           62   82   82   82   62       82</span></li><li> <span class="q"> c                           63   83   83   83   63       83</span></li><li> <span class="q"> d                           64   84   84   84   64       84</span></li><li> <span class="q"> e                           65   85   85   85   65       85</span></li><li> <span class="q"> f                           66   86   86   86   66       86</span></li><li> <span class="q"> g                           67   87   87   87   67       87</span></li><li> <span class="q"> h                           68   88   88   88   68       88</span></li><li> <span class="q"> i                           69   89   89   89   69       89</span></li><li> <span class="q"> &lt;LEFT POINTING GUILLEMET&gt;   AB   8A   8A   8A   C2.AB    80.52</span></li><li> <span class="q"> &lt;RIGHT POINTING GUILLEMET&gt;  BB   8B   8B   8B   C2.BB    80.6A</span></li><li> <span class="q"> &lt;SMALL LETTER eth&gt;          F0   8C   8C   8C   C3.B0    8B.57</span></li><li> <span class="q"> &lt;y WITH ACUTE&gt;              FD   8D   8D   8D   C3.BD    8B.71</span></li><li> <span class="q"> &lt;SMALL LETTER thorn&gt;        FE   8E   8E   8E   C3.BE    8B.72</span></li><li> <span class="q"> &lt;PLUS-OR-MINUS SIGN&gt;        B1   8F   8F   8F   C2.B1    80.58</span></li><li> <span class="q"> &lt;DEGREE SIGN&gt;               B0   90   90   90   C2.B0    80.57</span></li><li> <span class="q"> j                           6A   91   91   91   6A       91</span></li><li> <span class="q"> k                           6B   92   92   92   6B       92</span></li><li> <span class="q"> l                           6C   93   93   93   6C       93</span></li><li> <span class="q"> m                           6D   94   94   94   6D       94</span></li><li> <span class="q"> n                           6E   95   95   95   6E       95</span></li><li> <span class="q"> o                           6F   96   96   96   6F       96</span></li><li> <span class="q"> p                           70   97   97   97   70       97</span></li><li> <span class="q"> q                           71   98   98   98   71       98</span></li><li> <span class="q"> r                           72   99   99   99   72       99</span></li><li> <span class="q"> &lt;FEMININE ORDINAL&gt;          AA   9A   9A   9A   C2.AA    80.51</span></li><li> <span class="q"> &lt;MASC. ORDINAL INDICATOR&gt;   BA   9B   9B   9B   C2.BA    80.69</span></li><li> <span class="q"> &lt;SMALL LIGATURE ae&gt;         E6   9C   9C   9C   C3.A6    8B.47</span></li><li> <span class="q"> &lt;CEDILLA&gt;                   B8   9D   9D   9D   C2.B8    80.67</span></li><li> <span class="q"> &lt;CAPITAL LIGATURE AE&gt;       C6   9E   9E   9E   C3.86    8A.47</span></li><li> <span class="q"> &lt;CURRENCY SIGN&gt;             A4   9F   9F   9F   C2.A4    80.45</span></li><li> <span class="q"> &lt;MICRO SIGN&gt;                B5   A0   A0   A0   C2.B5    80.64</span></li><li> <span class="q"> ~                           7E   A1   A1   FF   7E       A1     ##</span></li><li> <span class="q"> s                           73   A2   A2   A2   73       A2</span></li><li> <span class="q"> t                           74   A3   A3   A3   74       A3</span></li><li> <span class="q"> u                           75   A4   A4   A4   75       A4</span></li><li> <span class="q"> v                           76   A5   A5   A5   76       A5</span></li><li> <span class="q"> w                           77   A6   A6   A6   77       A6</span></li><li> <span class="q"> x                           78   A7   A7   A7   78       A7</span></li><li> <span class="q"> y                           79   A8   A8   A8   79       A8</span></li><li> <span class="q"> z                           7A   A9   A9   A9   7A       A9</span></li><li> <span class="q"> &lt;INVERTED &quot;!&quot; &gt;             A1   AA   AA   AA   C2.A1    80.42</span></li><li> <span class="q"> &lt;INVERTED QUESTION MARK&gt;    BF   AB   AB   AB   C2.BF    80.73</span></li><li> <span class="q"> &lt;CAPITAL LETTER ETH&gt;        D0   AC   AC   AC   C3.90    8A.57</span></li><li> <span class="q"> [                           5B   BA   AD   BB   5B       AD     ** ##</span></li><li> <span class="q"> &lt;CAPITAL LETTER THORN&gt;      DE   AE   AE   AE   C3.9E    8A.72</span></li><li> <span class="q"> &lt;REGISTERED TRADE MARK&gt;     AE   AF   AF   AF   C2.AE    80.55</span></li><li> <span class="q"> &lt;NOT SIGN&gt;                  AC   5F   B0   BA   C2.AC    80.53  ** ##</span></li><li> <span class="q"> &lt;POUND SIGN&gt;                A3   B1   B1   B1   C2.A3    80.44</span></li><li> <span class="q"> &lt;YEN SIGN&gt;                  A5   B2   B2   B2   C2.A5    80.46</span></li><li> <span class="q"> &lt;MIDDLE DOT&gt;                B7   B3   B3   B3   C2.B7    80.66</span></li><li> <span class="q"> &lt;COPYRIGHT SIGN&gt;            A9   B4   B4   B4   C2.A9    80.4A</span></li><li> <span class="q"> &lt;SECTION SIGN&gt;              A7   B5   B5   B5   C2.A7    80.48</span></li><li> <span class="q"> &lt;PARAGRAPH SIGN&gt;            B6   B6   B6   B6   C2.B6    80.65</span></li><li> <span class="q"> &lt;FRACTION ONE QUARTER&gt;      BC   B7   B7   B7   C2.BC    80.70</span></li><li> <span class="q"> &lt;FRACTION ONE HALF&gt;         BD   B8   B8   B8   C2.BD    80.71</span></li><li> <span class="q"> &lt;FRACTION THREE QUARTERS&gt;   BE   B9   B9   B9   C2.BE    80.72</span></li><li> <span class="q"> &lt;Y WITH ACUTE&gt;              DD   AD   BA   AD   C3.9D    8A.71  ** ##</span></li><li> <span class="q"> &lt;DIAERESIS&gt;                 A8   BD   BB   79   C2.A8    80.49  ** ##</span></li><li> <span class="q"> &lt;MACRON&gt;                    AF   BC   BC   A1   C2.AF    80.56  ##</span></li><li> <span class="q"> ]                           5D   BB   BD   BD   5D       BD     **</span></li><li> <span class="q"> &lt;ACUTE ACCENT&gt;              B4   BE   BE   BE   C2.B4    80.63</span></li><li> <span class="q"> &lt;MULTIPLICATION SIGN&gt;       D7   BF   BF   BF   C3.97    8A.66</span></li><li> <span class="q"> {                           7B   C0   C0   FB   7B       C0     ##</span></li><li> <span class="q"> A                           41   C1   C1   C1   41       C1</span></li><li> <span class="q"> B                           42   C2   C2   C2   42       C2</span></li><li> <span class="q"> C                           43   C3   C3   C3   43       C3</span></li><li> <span class="q"> D                           44   C4   C4   C4   44       C4</span></li><li> <span class="q"> E                           45   C5   C5   C5   45       C5</span></li><li> <span class="q"> F                           46   C6   C6   C6   46       C6</span></li><li> <span class="q"> G                           47   C7   C7   C7   47       C7</span></li><li> <span class="q"> H                           48   C8   C8   C8   48       C8</span></li><li> <span class="q"> I                           49   C9   C9   C9   49       C9</span></li><li> <span class="q"> &lt;SOFT HYPHEN&gt;               AD   CA   CA   CA   C2.AD    80.54</span></li><li> <span class="q"> &lt;o WITH CIRCUMFLEX&gt;         F4   CB   CB   CB   C3.B4    8B.63</span></li><li> <span class="q"> &lt;o WITH DIAERESIS&gt;          F6   CC   CC   CC   C3.B6    8B.65</span></li><li> <span class="q"> &lt;o WITH GRAVE&gt;              F2   CD   CD   CD   C3.B2    8B.59</span></li><li> <span class="q"> &lt;o WITH ACUTE&gt;              F3   CE   CE   CE   C3.B3    8B.62</span></li><li> <span class="q"> &lt;o WITH TILDE&gt;              F5   CF   CF   CF   C3.B5    8B.64</span></li><li> <span class="q"> }                           7D   D0   D0   FD   7D       D0     ##</span></li><li> <span class="q"> J                           4A   D1   D1   D1   4A       D1</span></li><li> <span class="q"> K                           4B   D2   D2   D2   4B       D2</span></li><li> <span class="q"> L                           4C   D3   D3   D3   4C       D3</span></li><li> <span class="q"> M                           4D   D4   D4   D4   4D       D4</span></li><li> <span class="q"> N                           4E   D5   D5   D5   4E       D5</span></li><li> <span class="q"> O                           4F   D6   D6   D6   4F       D6</span></li><li> <span class="q"> P                           50   D7   D7   D7   50       D7</span></li><li> <span class="q"> Q                           51   D8   D8   D8   51       D8</span></li><li> <span class="q"> R                           52   D9   D9   D9   52       D9</span></li><li> <span class="q"> &lt;SUPERSCRIPT ONE&gt;           B9   DA   DA   DA   C2.B9    80.68</span></li><li> <span class="q"> &lt;u WITH CIRCUMFLEX&gt;         FB   DB   DB   DB   C3.BB    8B.6A</span></li><li> <span class="q"> &lt;u WITH DIAERESIS&gt;          FC   DC   DC   DC   C3.BC    8B.70</span></li><li> <span class="q"> &lt;u WITH GRAVE&gt;              F9   DD   DD   C0   C3.B9    8B.68  ##</span></li><li> <span class="q"> &lt;u WITH ACUTE&gt;              FA   DE   DE   DE   C3.BA    8B.69</span></li><li> <span class="q"> &lt;y WITH DIAERESIS&gt;          FF   DF   DF   DF   C3.BF    8B.73</span></li><li> <span class="q"> \                           5C   E0   E0   BC   5C       E0     ##</span></li><li> <span class="q"> &lt;DIVISION SIGN&gt;             F7   E1   E1   E1   C3.B7    8B.66</span></li><li> <span class="q"> S                           53   E2   E2   E2   53       E2</span></li><li> <span class="q"> T                           54   E3   E3   E3   54       E3</span></li><li> <span class="q"> U                           55   E4   E4   E4   55       E4</span></li><li> <span class="q"> V                           56   E5   E5   E5   56       E5</span></li><li> <span class="q"> W                           57   E6   E6   E6   57       E6</span></li><li> <span class="q"> X                           58   E7   E7   E7   58       E7</span></li><li> <span class="q"> Y                           59   E8   E8   E8   59       E8</span></li><li> <span class="q"> Z                           5A   E9   E9   E9   5A       E9</span></li><li> <span class="q"> &lt;SUPERSCRIPT TWO&gt;           B2   EA   EA   EA   C2.B2    80.59</span></li><li> <span class="q"> &lt;O WITH CIRCUMFLEX&gt;         D4   EB   EB   EB   C3.94    8A.63</span></li><li> <span class="q"> &lt;O WITH DIAERESIS&gt;          D6   EC   EC   EC   C3.96    8A.65</span></li><li> <span class="q"> &lt;O WITH GRAVE&gt;              D2   ED   ED   ED   C3.92    8A.59</span></li><li> <span class="q"> &lt;O WITH ACUTE&gt;              D3   EE   EE   EE   C3.93    8A.62</span></li><li> <span class="q"> &lt;O WITH TILDE&gt;              D5   EF   EF   EF   C3.95    8A.64</span></li><li> <span class="q"> 0                           30   F0   F0   F0   30       F0</span></li><li> <span class="q"> 1                           31   F1   F1   F1   31       F1</span></li><li> <span class="q"> 2                           32   F2   F2   F2   32       F2</span></li><li> <span class="q"> 3                           33   F3   F3   F3   33       F3</span></li><li> <span class="q"> 4                           34   F4   F4   F4   34       F4</span></li><li> <span class="q"> 5                           35   F5   F5   F5   35       F5</span></li><li> <span class="q"> 6                           36   F6   F6   F6   36       F6</span></li><li> <span class="q"> 7                           37   F7   F7   F7   37       F7</span></li><li> <span class="q"> 8                           38   F8   F8   F8   38       F8</span></li><li> <span class="q"> 9                           39   F9   F9   F9   39       F9</span></li><li> <span class="q"> &lt;SUPERSCRIPT THREE&gt;         B3   FA   FA   FA   C2.B3    80.62</span></li><li> <span class="q"> &lt;U WITH CIRCUMFLEX&gt;         DB   FB   FB   DD   C3.9B    8A.6A  ##</span></li><li> <span class="q"> &lt;U WITH DIAERESIS&gt;          DC   FC   FC   FC   C3.9C    8A.70</span></li><li> <span class="q"> &lt;U WITH GRAVE&gt;              D9   FD   FD   E0   C3.99    8A.68  ##</span></li><li> <span class="q"> &lt;U WITH ACUTE&gt;              DA   FE   FE   FE   C3.9A    8A.69</span></li><li> <span class="q"> &lt;APC&gt;                       9F   FF   FF   5F   C2.9F    FF     ##</span></li></ol></pre><a name="IDENTIFYING-CHARACTER-CODE-SETS"></a><h1>IDENTIFYING CHARACTER CODE SETS</h1>
<p>It is possible to determine which character set you are operating under.
But first you need to be really really sure you need to do this.  Your
code will be simpler and probably just as portable if you don't have
to test the character set and do different things, depending.  There are
actually only very few circumstances where it's not easy to write
straight-line code portable to all character sets.  See
<a href="perluniintro.html#Unicode-and-EBCDIC">Unicode and EBCDIC in perluniintro</a> for how to portably specify
characters.</p>
<p>But there are some cases where you may want to know which character set
you are running under.  One possible example is doing
<a href="#SORTING">sorting</a> in inner loops where performance is critical.</p>
<p>To determine if you are running under ASCII or EBCDIC, you can use the
return value of <code class="inline"><a class="l_k" href="functions/ord.html">ord()</a></code> or <code class="inline"><a class="l_k" href="functions/chr.html">chr()</a></code> to test one or more character
values.  For example:</p>
<pre class="verbatim"><ol><li>    <span class="i">$is_ascii</span>  = <span class="q">&quot;A&quot;</span> <a class="l_k" href="functions/eq.html">eq</a> <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">65</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic</span> = <span class="q">&quot;A&quot;</span> <a class="l_k" href="functions/eq.html">eq</a> <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">193</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="i">$is_ascii</span>  = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&quot;A&quot;</span><span class="s">)</span> == <span class="n">65</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic</span> = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&quot;A&quot;</span><span class="s">)</span> == <span class="n">193</span><span class="sc">;</span></li></ol></pre><p>There's even less need to distinguish between EBCDIC code pages, but to
do so try looking at one or more of the characters that differ between
them.</p>
<pre class="verbatim"><ol><li>    <span class="i">$is_ascii</span>           = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&#39;[&#39;</span><span class="s">)</span> == <span class="n">91</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic_37</span>       = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&#39;[&#39;</span><span class="s">)</span> == <span class="n">186</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic_1047</span>     = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&#39;[&#39;</span><span class="s">)</span> == <span class="n">173</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic_POSIX_BC</span> = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&#39;[&#39;</span><span class="s">)</span> == <span class="n">187</span><span class="sc">;</span></li></ol></pre><p>However, it would be unwise to write tests such as:</p>
<pre class="verbatim"><ol><li>    <span class="i">$is_ascii</span> = <span class="q">&quot;\r&quot;</span> ne <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">13</span><span class="s">)</span><span class="sc">;</span>  <span class="c">#  WRONG</span></li><li>    <span class="i">$is_ascii</span> = <span class="q">&quot;\n&quot;</span> ne <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">10</span><span class="s">)</span><span class="sc">;</span>  <span class="c">#  ILL ADVISED</span></li></ol></pre><p>Obviously the first of these will fail to distinguish most ASCII
platforms from either a CCSID 0037, a 1047, or a POSIX-BC EBCDIC
platform since <code class="inline"><span class="q">&quot;\r&quot;</span> <a class="l_k" href="functions/eq.html">eq</a> <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">13</span><span class="s">)</span></code>
 under all of those coded character
sets.  But note too that because <code class="inline"><span class="q">&quot;\n&quot;</span></code>
 is <code class="inline"><a class="l_k" href="functions/chr.html">chr(13)</a></code> and <code class="inline"><span class="q">&quot;\r&quot;</span></code>
 is
<code class="inline"><a class="l_k" href="functions/chr.html">chr(10)</a></code> on old Macintosh (which is an ASCII platform) the second
<code class="inline"><span class="i">$is_ascii</span></code>
 test will lead to trouble there.</p>
<p>To determine whether or not perl was built under an EBCDIC
code page you can use the Config module like so:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/use.html">use</a> <span class="w">Config</span><span class="sc">;</span></li><li>    <span class="i">$is_ebcdic</span> = <span class="i">$Config</span>{<span class="q">&#39;ebcdic&#39;</span>} eq <span class="q">&#39;define&#39;</span><span class="sc">;</span></li></ol></pre><a name="CONVERSIONS"></a><h1>CONVERSIONS</h1>
<a name="utf8%3a%3aunicode_to_native()-and-utf8%3a%3anative_to_unicode()"></a><h2><code class="inline"><span class="i">utf8::unicode_to_native</span><span class="s">(</span><span class="s">)</span></code>
 and <code class="inline"><span class="i">utf8::native_to_unicode</span><span class="s">(</span><span class="s">)</span></code>
</h2>
<p>These functions take an input numeric code point in one encoding and
return what its equivalent value is in the other.</p>
<p>See <a href="utf8.html">utf8</a>.</p>
<a name="tr%2f%2f%2f"></a><h2>tr///</h2>
<p>In order to convert a string of characters from one character set to
another a simple list of numbers, such as in the right columns in the
above table, along with Perl's <code class="inline"><a class="l_k" href="functions/tr.html">tr///</a></code> operator is all that is needed.
The data in the table are in ASCII/Latin1 order, hence the EBCDIC columns
provide easy-to-use ASCII/Latin1 to EBCDIC operations that are also easily
reversed.</p>
<p>For example, to convert ASCII/Latin1 to code page 037 take the output of the
second numbers column from the output of recipe 2 (modified to add
<code class="inline"><span class="q">&quot;\&quot;</span></code>
 characters), and use it in <code class="inline"><a class="l_k" href="functions/tr.html">tr///</a></code> like so:</p>
<pre class="verbatim"><ol><li>    <span class="i">$cp_037</span> =</li><li>    <span class="q">&#39;\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F&#39;</span> .</li><li>    <span class="q">&#39;\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x1C\x1D\x1E\x1F&#39;</span> .</li><li>    <span class="q">&#39;\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61&#39;</span> .</li><li>    <span class="q">&#39;\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F&#39;</span> .</li><li>    <span class="q">&#39;\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6&#39;</span> .</li><li>    <span class="q">&#39;\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xBA\xE0\xBB\xB0\x6D&#39;</span> .</li><li>    <span class="q">&#39;\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96&#39;</span> .</li><li>    <span class="q">&#39;\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07&#39;</span> .</li><li>    <span class="q">&#39;\x20\x21\x22\x23\x24\x15\x06\x17\x28\x29\x2A\x2B\x2C\x09\x0A\x1B&#39;</span> .</li><li>    <span class="q">&#39;\x30\x31\x1A\x33\x34\x35\x36\x08\x38\x39\x3A\x3B\x04\x14\x3E\xFF&#39;</span> .</li><li>    <span class="q">&#39;\x41\xAA\x4A\xB1\x9F\xB2\x6A\xB5\xBD\xB4\x9A\x8A\x5F\xCA\xAF\xBC&#39;</span> .</li><li>    <span class="q">&#39;\x90\x8F\xEA\xFA\xBE\xA0\xB6\xB3\x9D\xDA\x9B\x8B\xB7\xB8\xB9\xAB&#39;</span> .</li><li>    <span class="q">&#39;\x64\x65\x62\x66\x63\x67\x9E\x68\x74\x71\x72\x73\x78\x75\x76\x77&#39;</span> .</li><li>    <span class="q">&#39;\xAC\x69\xED\xEE\xEB\xEF\xEC\xBF\x80\xFD\xFE\xFB\xFC\xAD\xAE\x59&#39;</span> .</li><li>    <span class="q">&#39;\x44\x45\x42\x46\x43\x47\x9C\x48\x54\x51\x52\x53\x58\x55\x56\x57&#39;</span> .</li><li>    <span class="q">&#39;\x8C\x49\xCD\xCE\xCB\xCF\xCC\xE1\x70\xDD\xDE\xDB\xDC\x8D\x8E\xDF&#39;</span><span class="sc">;</span></li><li></li><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$ebcdic_string</span> = <span class="i">$ascii_string</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/eval.html">eval</a> <span class="q">&#39;$ebcdic_string =~ tr/\000-\377/&#39;</span> . <span class="i">$cp_037</span> . <span class="q">&#39;/&#39;</span><span class="sc">;</span></li></ol></pre><p>To convert from EBCDIC 037 to ASCII just reverse the order of the tr///
arguments like so:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$ascii_string</span> = <span class="i">$ebcdic_string</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/eval.html">eval</a> <span class="q">&#39;$ascii_string =~ tr/&#39;</span> . <span class="i">$cp_037</span> . <span class="q">&#39;/\000-\377/&#39;</span><span class="sc">;</span></li></ol></pre><p>Similarly one could take the output of the third numbers column from recipe 2
to obtain a <code class="inline"><span class="i">$cp_1047</span></code>
 table.  The fourth numbers column of the output from
recipe 2 could provide a <code class="inline"><span class="i">$cp_posix_bc</span></code>
 table suitable for transcoding as
well.</p>
<p>If you wanted to see the inverse tables, you would first have to sort on the
desired numbers column as in recipes 4, 5 or 6, then take the output of the
first numbers column.</p>
<a name="iconv"></a><h2>iconv</h2>
<p>XPG operability often implies the presence of an <i>iconv</i> utility
available from the shell or from the C library.  Consult your system's
documentation for information on iconv.</p>
<p>On OS/390 or z/OS see the <i>iconv(1)</i> manpage.  One way to invoke the <code class="inline"><span class="w">iconv</span></code>

shell utility from within perl would be to:</p>
<pre class="verbatim"><ol><li>    <span class="c"># OS/390 or z/OS example</span></li><li>    <span class="i">$ascii_data</span> = <span class="q">`echo &#39;$ebcdic_data&#39;| iconv -f IBM-1047 -t ISO8859-1`</span></li></ol></pre><p>or the inverse map:</p>
<pre class="verbatim"><ol><li>    <span class="c"># OS/390 or z/OS example</span></li><li>    <span class="i">$ebcdic_data</span> = <span class="q">`echo &#39;$ascii_data&#39;| iconv -f ISO8859-1 -t IBM-1047`</span></li></ol></pre><p>For other Perl-based conversion options see the <code class="inline"><span class="w">Convert::</span>*</code>
 modules on CPAN.</p>
<a name="C-RTL"></a><h2>C RTL</h2>
<p>The OS/390 and z/OS C run-time libraries provide <code class="inline"><span class="i">_atoe</span><span class="s">(</span><span class="s">)</span></code>
 and <code class="inline"><span class="i">_etoa</span><span class="s">(</span><span class="s">)</span></code>
 functions.</p>
<a name="OPERATOR-DIFFERENCES"></a><h1>OPERATOR DIFFERENCES</h1>
<p>The <code class="inline">..</code>
 range operator treats certain character ranges with
care on EBCDIC platforms.  For example the following array
will have twenty six elements on either an EBCDIC platform
or an ASCII platform:</p>
<pre class="verbatim"><ol><li>    <span class="i">@alphabet</span> = <span class="s">(</span><span class="q">&#39;A&#39;</span>..<span class="q">&#39;Z&#39;</span><span class="s">)</span><span class="sc">;</span>   <span class="c">#  $#alphabet == 25</span></li></ol></pre><p>The bitwise operators such as &amp; ^ | may return different results
when operating on string or character data in a Perl program running
on an EBCDIC platform than when run on an ASCII platform.  Here is
an example adapted from the one in <a href="perlop.html">perlop</a>:</p>
<pre class="verbatim"><ol><li>    <span class="c"># EBCDIC-based examples</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;j p \n&quot;</span> ^ <span class="q">&quot; a h&quot;</span><span class="sc">;</span>                      <span class="c"># prints &quot;JAPH\n&quot;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;JA&quot;</span> | <span class="q">&quot;  ph\n&quot;</span><span class="sc">;</span>                        <span class="c"># prints &quot;japh\n&quot;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;JAPH\nJunk&quot;</span> &amp; <span class="q">&quot;\277\277\277\277\277&quot;</span><span class="sc">;</span>  <span class="c"># prints &quot;japh\n&quot;;</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&#39;p N$&#39;</span> ^ <span class="q">&quot; E&lt;H\n&quot;</span><span class="sc">;</span>                      <span class="c"># prints &quot;Perl\n&quot;;</span></li></ol></pre><p>An interesting property of the 32 C0 control characters
in the ASCII table is that they can "literally" be constructed
as control characters in Perl, e.g. <code class="inline"><span class="s">(</span><a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">0</span><span class="s">)</span></code>
 eq <code class="inline">\<span class="w">c</span><span class="i">@</span></code>
)&gt;
<code class="inline"><span class="s">(</span><a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">1</span><span class="s">)</span></code>
 eq <code class="inline">\<span class="w">cA</span></code>
)&gt;, and so on.  Perl on EBCDIC platforms has been
ported to take <code class="inline">\<span class="w">c</span><span class="i">@</span></code>
 to <code class="inline"><a class="l_k" href="functions/chr.html">chr(0)</a></code> and <code class="inline">\<span class="w">cA</span></code>
 to <code class="inline"><a class="l_k" href="functions/chr.html">chr(1)</a></code>, etc. as well, but the
characters that result depend on which code page you are
using.  The table below uses the standard acronyms for the controls.
The POSIX-BC and 1047 sets are
identical throughout this range and differ from the 0037 set at only
one spot (21 decimal).  Note that the line terminator character
may be generated by <code class="inline">\<span class="w">cJ</span></code>
 on ASCII platforms but by <code class="inline">\<span class="w">cU</span></code>
 on 1047 or POSIX-BC
platforms and cannot be generated as a <code class="inline"><span class="q">&quot;\c.letter.&quot;</span></code>
 control character on
0037 platforms.  Note also that <code class="inline">\<span class="w">c</span>\</code>
 cannot be the final element in a string
or regex, as it will absorb the terminator.   But <code class="inline">\c\<i>X</i></code> is a <code class="inline"><span class="w">FILE</span>
<span class="w">SEPARATOR</span></code>
 concatenated with <i>X</i> for all <i>X</i>.
The outlier <code class="inline">\<span class="w">c</span>?</code>
 on ASCII, which yields a non-C0 control <code class="inline"><span class="w">DEL</span></code>
,
yields the outlier control <code class="inline"><span class="w">APC</span></code>
 on EBCDIC, the one that isn't in the
block of contiguous controls.  Note that a subtlety of this is that
<code class="inline">\<span class="w">c</span>?</code>
 on ASCII platforms is an ASCII character, while it isn't
equivalent to any ASCII character in EBCDIC platforms.</p>
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/chr.html">chr</a>   <a class="l_k" href="functions/ord.html">ord</a>   <span class="n">8859</span>-<span class="n">1</span>    <span class="n">0037</span>    <span class="n">1047</span> &amp;&amp; <span class="w">POSIX</span>-<span class="w">BC</span></li><li> -----------------------------------------------------------------------</li><li> \<span class="w">c</span><span class="i">@     0</span>   &lt;<span class="w">NUL</span>&gt;     <span class="q">&lt;NUL&gt;</span>        &lt;<span class="w">NUL</span>&gt;</li><li> \<span class="w">cA</span>     <span class="n">1</span>   &lt;<span class="w">SOH</span>&gt;     <span class="q">&lt;SOH&gt;</span>        &lt;<span class="w">SOH</span>&gt;</li><li> \<span class="w">cB</span>     <span class="n">2</span>   &lt;<span class="w">STX</span>&gt;     <span class="q">&lt;STX&gt;</span>        &lt;<span class="w">STX</span>&gt;</li><li> \<span class="w">cC</span>     <span class="n">3</span>   &lt;<span class="w">ETX</span>&gt;     <span class="q">&lt;ETX&gt;</span>        &lt;<span class="w">ETX</span>&gt;</li><li> \<span class="w">cD</span>     <span class="n">4</span>   &lt;<span class="w">EOT</span>&gt;     <span class="q">&lt;ST&gt;</span>         &lt;<span class="w">ST</span>&gt;</li><li> \<span class="w">cE</span>     <span class="n">5</span>   &lt;<span class="w">ENQ</span>&gt;     <span class="q">&lt;HT&gt;</span>         &lt;<span class="w">HT</span>&gt;</li><li> \<span class="w">cF</span>     <span class="n">6</span>   &lt;<span class="w">ACK</span>&gt;     <span class="q">&lt;SSA&gt;</span>        &lt;<span class="w">SSA</span>&gt;</li><li> \<span class="w">cG</span>     <span class="n">7</span>   &lt;<span class="w">BEL</span>&gt;     <span class="q">&lt;DEL&gt;</span>        &lt;<span class="w">DEL</span>&gt;</li><li> \<span class="w">cH</span>     <span class="n">8</span>   &lt;<span class="w">BS</span>&gt;      <span class="q">&lt;EPA&gt;</span>        &lt;<span class="w">EPA</span>&gt;</li><li> \<span class="w">cI</span>     <span class="n">9</span>   &lt;<span class="w">HT</span>&gt;      <span class="q">&lt;RI&gt;</span>         &lt;<span class="w">RI</span>&gt;</li><li> \<span class="w">cJ</span>    <span class="n">10</span>   &lt;<span class="w">LF</span>&gt;      <span class="q">&lt;SS2&gt;</span>        &lt;<span class="w">SS2</span>&gt;</li><li> \<span class="w">cK</span>    <span class="n">11</span>   &lt;<span class="w">VT</span>&gt;      <span class="q">&lt;VT&gt;</span>         &lt;<span class="w">VT</span>&gt;</li><li> \<span class="w">cL</span>    <span class="n">12</span>   &lt;<span class="w">FF</span>&gt;      <span class="q">&lt;FF&gt;</span>         &lt;<span class="w">FF</span>&gt;</li><li> \<span class="w">cM</span>    <span class="n">13</span>   &lt;<span class="w">CR</span>&gt;      <span class="q">&lt;CR&gt;</span>         &lt;<span class="w">CR</span>&gt;</li><li> \<span class="w">cN</span>    <span class="n">14</span>   &lt;<span class="w">SO</span>&gt;      <span class="q">&lt;SO&gt;</span>         &lt;<span class="w">SO</span>&gt;</li><li> \<span class="w">cO</span>    <span class="n">15</span>   &lt;<span class="w">SI</span>&gt;      <span class="q">&lt;SI&gt;</span>         &lt;<span class="w">SI</span>&gt;</li><li> \<span class="w">cP</span>    <span class="n">16</span>   &lt;<span class="w">DLE</span>&gt;     <span class="q">&lt;DLE&gt;</span>        &lt;<span class="w">DLE</span>&gt;</li><li> \<span class="w">cQ</span>    <span class="n">17</span>   &lt;<span class="w">DC1</span>&gt;     <span class="q">&lt;DC1&gt;</span>        &lt;<span class="w">DC1</span>&gt;</li><li> \<span class="w">cR</span>    <span class="n">18</span>   &lt;<span class="w">DC2</span>&gt;     <span class="q">&lt;DC2&gt;</span>        &lt;<span class="w">DC2</span>&gt;</li><li> \<span class="w">cS</span>    <span class="n">19</span>   &lt;<span class="w">DC3</span>&gt;     <span class="q">&lt;DC3&gt;</span>        &lt;<span class="w">DC3</span>&gt;</li><li> \<span class="w">cT</span>    <span class="n">20</span>   &lt;<span class="w">DC4</span>&gt;     <span class="q">&lt;OSC&gt;</span>        &lt;<span class="w">OSC</span>&gt;</li><li> \<span class="w">cU</span>    <span class="n">21</span>   &lt;<span class="w">NAK</span>&gt;     <span class="q">&lt;NEL&gt;</span>        &lt;<span class="w">LF</span>&gt;              <span class="i">**</span></li><li> \<span class="w">cV</span>    <span class="n">22</span>   &lt;<span class="w">SYN</span>&gt;     <span class="q">&lt;BS&gt;</span>         &lt;<span class="w">BS</span>&gt;</li><li> \<span class="w">cW</span>    <span class="n">23</span>   &lt;<span class="w">ETB</span>&gt;     <span class="q">&lt;ESA&gt;</span>        &lt;<span class="w">ESA</span>&gt;</li><li> \<span class="w">cX</span>    <span class="n">24</span>   &lt;<span class="w">CAN</span>&gt;     <span class="q">&lt;CAN&gt;</span>        &lt;<span class="w">CAN</span>&gt;</li><li> \<span class="w">cY</span>    <span class="n">25</span>   &lt;<span class="w">EOM</span>&gt;     <span class="q">&lt;EOM&gt;</span>        &lt;<span class="w">EOM</span>&gt;</li><li> \<span class="w">cZ</span>    <span class="n">26</span>   &lt;<span class="w">SUB</span>&gt;     <span class="q">&lt;PU2&gt;</span>        &lt;<span class="w">PU2</span>&gt;</li><li> \<span class="w">c</span><span class="s">[</span>    <span class="n">27</span>   &lt;<span class="w">ESC</span>&gt;     <span class="q">&lt;SS3&gt;</span>        &lt;<span class="w">SS3</span>&gt;</li><li> \<span class="w">c</span>\<span class="w">X</span>   <span class="n">28</span>   &lt;<span class="w">FS</span>&gt;<span class="w">X</span>     <span class="q">&lt;FS&gt;</span><span class="w">X</span>        <span class="q">&lt;FS&gt;</span><span class="w">X</span></li><li> \<span class="w">c</span><span class="s">]</span>    <span class="n">29</span>   &lt;<span class="w">GS</span>&gt;      <span class="q">&lt;GS&gt;</span>         &lt;<span class="w">GS</span>&gt;</li><li> \<span class="w">c</span>^    <span class="n">30</span>   &lt;<span class="w">RS</span>&gt;      <span class="q">&lt;RS&gt;</span>         &lt;<span class="w">RS</span>&gt;</li><li> \<span class="w">c_</span>    <span class="n">31</span>   &lt;<span class="w">US</span>&gt;      <span class="q">&lt;US&gt;</span>         &lt;<span class="w">US</span>&gt;</li><li> \<span class="w">c</span>?    <span class="i">*    &lt;</span><span class="w">DEL</span>&gt;     <span class="q">&lt;APC&gt;</span>        &lt;<span class="w">APC</span>&gt;</li></ol></pre><p><code class="inline"><span class="i">*</span></code>
 Note: <code class="inline">\<span class="w">c</span>?</code>
 maps to ordinal 127 (<code class="inline"><span class="w">DEL</span></code>
) on ASCII platforms, but
since ordinal 127 is a not a control character on EBCDIC machines,
<code class="inline">\<span class="w">c</span>?</code>
 instead maps on them to <code class="inline"><span class="w">APC</span></code>
, which is 255 in 0037 and 1047,
and 95 in POSIX-BC.</p>
<a name="FUNCTION-DIFFERENCES"></a><h1>FUNCTION DIFFERENCES</h1>
<ul>
<li><a name="chr()"></a><b><code class="inline"><a class="l_k" href="functions/chr.html">chr()</a></code></b>
<p><code class="inline"><a class="l_k" href="functions/chr.html">chr()</a></code> must be given an EBCDIC code number argument to yield a desired
character return value on an EBCDIC platform.  For example:</p>
<pre class="verbatim"><ol><li>    <span class="i">$CAPITAL_LETTER_A</span> = <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="n">193</span><span class="s">)</span><span class="sc">;</span></li></ol></pre></li>
<li><a name="ord()"></a><b><code class="inline"><a class="l_k" href="functions/ord.html">ord()</a></code></b>
<p><code class="inline"><a class="l_k" href="functions/ord.html">ord()</a></code> will return EBCDIC code number values on an EBCDIC platform.
For example:</p>
<pre class="verbatim"><ol><li>    <span class="i">$the_number_193</span> = <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&quot;A&quot;</span><span class="s">)</span><span class="sc">;</span></li></ol></pre></li>
<li><a name="pack()"></a><b><code class="inline"><a class="l_k" href="functions/pack.html">pack()</a></code></b>
<p>The <code class="inline"><span class="q">&quot;c&quot;</span></code>
 and <code class="inline"><span class="q">&quot;C&quot;</span></code>
 templates for <code class="inline"><a class="l_k" href="functions/pack.html">pack()</a></code> are dependent upon character set
encoding.  Examples of usage on EBCDIC include:</p>
<pre class="verbatim"><ol><li>    <span class="i">$foo</span> = <a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">&quot;CCCC&quot;</span><span class="cm">,</span><span class="n">193</span><span class="cm">,</span><span class="n">194</span><span class="cm">,</span><span class="n">195</span><span class="cm">,</span><span class="n">196</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="c"># $foo eq &quot;ABCD&quot;</span></li><li>    <span class="i">$foo</span> = <a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">&quot;C4&quot;</span><span class="cm">,</span><span class="n">193</span><span class="cm">,</span><span class="n">194</span><span class="cm">,</span><span class="n">195</span><span class="cm">,</span><span class="n">196</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="c"># same thing</span></li><li></li><li>    <span class="i">$foo</span> = <a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">&quot;ccxxcc&quot;</span><span class="cm">,</span><span class="n">193</span><span class="cm">,</span><span class="n">194</span><span class="cm">,</span><span class="n">195</span><span class="cm">,</span><span class="n">196</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="c"># $foo eq &quot;AB\0\0CD&quot;</span></li></ol></pre><p>The <code class="inline"><span class="q">&quot;U&quot;</span></code>
 template has been ported to mean "Unicode" on all platforms so
that</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">&quot;U&quot;</span><span class="cm">,</span> <span class="n">65</span><span class="s">)</span> <a class="l_k" href="functions/eq.html">eq</a> <span class="q">&#39;A&#39;</span></li></ol></pre><p>is true on all platforms.  If you want native code points for the low
256, use the <code class="inline"><span class="q">&quot;W&quot;</span></code>
 template.  This means that the equivalences</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/pack.html">pack</a><span class="s">(</span><span class="q">&quot;W&quot;</span><span class="cm">,</span> <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="i">$character</span><span class="s">)</span><span class="s">)</span> <a class="l_k" href="functions/eq.html">eq</a> <span class="i">$character</span></li><li>    <a class="l_k" href="functions/unpack.html">unpack</a><span class="s">(</span><span class="q">&quot;W&quot;</span><span class="cm">,</span> <span class="i">$character</span><span class="s">)</span> == <a class="l_k" href="functions/ord.html">ord</a> <span class="i">$character</span></li></ol></pre><p>will hold.</p>
</li>
<li><a name="print()"></a><b><code class="inline"><a class="l_k" href="functions/print.html">print()</a></code></b>
<p>One must be careful with scalars and strings that are passed to
print that contain ASCII encodings.  One common place
for this to occur is in the output of the MIME type header for
CGI script writing.  For example, many Perl programming guides
recommend something similar to:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;Content-type:\ttext/html\015\012\015\012&quot;</span><span class="sc">;</span></li><li>    <span class="c"># this may be wrong on EBCDIC</span></li></ol></pre><p>You can instead write</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/print.html">print</a> <span class="q">&quot;Content-type:\ttext/html\r\n\r\n&quot;</span><span class="sc">;</span> <span class="c"># OK for DGW et al</span></li></ol></pre><p>and have it work portably.</p>
<p>That is because the translation from EBCDIC to ASCII is done
by the web server in this case.  Consult your web server's documentation for
further details.</p>
</li>
<li><a name="printf()"></a><b><code class="inline"><a class="l_k" href="functions/printf.html">printf()</a></code></b>
<p>The formats that can convert characters to numbers and vice versa
will be different from their ASCII counterparts when executed
on an EBCDIC platform.  Examples include:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%c%c%c&quot;</span><span class="cm">,</span><span class="n">193</span><span class="cm">,</span><span class="n">194</span><span class="cm">,</span><span class="n">195</span><span class="s">)</span><span class="sc">;</span>  <span class="c"># prints ABC</span></li></ol></pre></li>
<li><a name="sort()"></a><b><code class="inline"><a class="l_k" href="functions/sort.html">sort()</a></code></b>
<p>EBCDIC sort results may differ from ASCII sort results especially for
mixed case strings.  This is discussed in more detail <a href="#SORTING">below</a>.</p>
</li>
<li><a name="sprintf()"></a><b><code class="inline"><a class="l_k" href="functions/sprintf.html">sprintf()</a></code></b>
<p>See the discussion of <code class="inline"><a href="#printf()">printf()</a></code> above.  An example of the use
of sprintf would be:</p>
<pre class="verbatim"><ol><li>    <span class="i">$CAPITAL_LETTER_A</span> = <a class="l_k" href="functions/sprintf.html">sprintf</a><span class="s">(</span><span class="q">&quot;%c&quot;</span><span class="cm">,</span><span class="n">193</span><span class="s">)</span><span class="sc">;</span></li></ol></pre></li>
<li><a name="unpack()"></a><b><code class="inline"><a class="l_k" href="functions/unpack.html">unpack()</a></code></b>
<p>See the discussion of <code class="inline"><a href="#pack()">pack()</a></code> above.</p>
</li>
</ul>
<p>Note that it is possible to write portable code for these by specifying
things in Unicode numbers, and using a conversion function:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/printf.html">printf</a><span class="s">(</span><span class="q">&quot;%c&quot;</span><span class="cm">,</span><span class="i">utf8::unicode_to_native</span><span class="s">(</span><span class="n">65</span><span class="s">)</span><span class="s">)</span><span class="sc">;</span>  <span class="c"># prints A on all</span></li><li>                                               <span class="c"># platforms</span></li><li>    <a class="l_k" href="functions/print.html">print</a> <span class="i">utf8::native_to_unicode</span><span class="s">(</span><a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&quot;A&quot;</span><span class="s">)</span><span class="s">)</span><span class="sc">;</span>   <span class="c"># Likewise, prints 65</span></li></ol></pre><p>See <a href="perluniintro.html#Unicode-and-EBCDIC">Unicode and EBCDIC in perluniintro</a> and <a href="#CONVERSIONS">CONVERSIONS</a>
for other options.</p>
<a name="REGULAR-EXPRESSION-DIFFERENCES"></a><h1>REGULAR EXPRESSION DIFFERENCES</h1>
<p>You can write your regular expressions just like someone on an ASCII
platform would do.  But keep in mind that using octal or hex notation to
specify a particular code point will give you the character that the
EBCDIC code page natively maps to it.   (This is also true of all
double-quoted strings.)  If you want to write portably, just use the
<code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+...<span class="s">}</span></code>
 notation everywhere where you would have used <code class="inline">\<span class="i">x</span><span class="s">{</span>...<span class="s">}</span></code>
,
and don't use octal notation at all.</p>
<p>Starting in Perl v5.22, this applies to ranges in bracketed character
classes.  If you say, for example, <code class="inline"><a class="l_k" href="functions/qr.html">qr/[\N{U+20}-\N{U+7F}]/</a></code>, it means
the characters <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">20</span><span class="s">}</span></code>
, <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">21</span><span class="s">}</span></code>
, ..., <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+<span class="n">7</span><span class="w">F</span><span class="s">}</span></code>
.  This range
is all the printable characters that the ASCII character set contains.</p>
<p>Prior to v5.22, you couldn't specify any ranges portably, except
(starting in Perl v5.5.3) all subsets of the <code class="inline"><span class="s">[</span><span class="w">A</span>-<span class="w">Z</span><span class="s">]</span></code>
 and <code class="inline"><span class="s">[</span><span class="w">a</span>-z<span class="s">]</span></code>

ranges are specially coded to not pick up gap characters.  For example,
characters such as "&#xf4;" (<code class="inline"><span class="w">o</span> <span class="w">WITH</span> <span class="w">CIRCUMFLEX</span></code>
) that lie between
"I" and "J" would not be matched by the regular expression range
<code class="inline"><span class="q">/[H-K]/</span></code>
.  But if either of the range end points is explicitly numeric
(and neither is specified by <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+...<span class="s">}</span></code>
), the gap characters are
matched:</p>
<pre class="verbatim"><ol><li>    <span class="q">/[\x89-\x91]/</span></li></ol></pre><p>will match <code class="inline">\<span class="w">x8e</span></code>
, even though <code class="inline">\<span class="w">x89</span></code>
 is "i" and <code class="inline">\<span class="w">x91</span> </code>
 is "j",
and <code class="inline">\<span class="w">x8e</span></code>
 is a gap character, from the alphabetic viewpoint.</p>
<p>Another construct to be wary of is the inappropriate use of hex (unless
you use <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+...<span class="s">}</span></code>
) or
octal constants in regular expressions.  Consider the following
set of subs:</p>
<pre class="verbatim"><ol><li><a name="is_c0"></a>    sub <span class="m">is_c0</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\000-\037]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_print_ascii"></a>    sub <span class="m">is_print_ascii</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\040-\176]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_delete"></a>    sub <span class="m">is_delete</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> <a class="l_k" href="functions/eq.html">eq</a> <span class="q">&quot;\177&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_c1"></a>    sub <span class="m">is_c1</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\200-\237]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_latin_1"></a>    sub <span class="m">is_latin_1</span> <span class="s">{</span>    <span class="c"># But not ASCII; not C1</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\240-\377]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>These are valid only on ASCII platforms.  Starting in Perl v5.22, simply
changing the octal constants to equivalent <code class="inline">\<span class="i">N</span><span class="s">{</span><span class="w">U</span>+...<span class="s">}</span></code>
 values makes
them portable:</p>
<pre class="verbatim"><ol><li><a name="is_c0"></a>    sub <span class="m">is_c0</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\N{U+00}-\N{U+1F}]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_print_ascii"></a>    sub <span class="m">is_print_ascii</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\N{U+20}-\N{U+7E}]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_delete"></a>    sub <span class="m">is_delete</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> <a class="l_k" href="functions/eq.html">eq</a> <span class="q">&quot;\N{U+7F}&quot;</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_c1"></a>    sub <span class="m">is_c1</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\N{U+80}-\N{U+9F}]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="is_latin_1"></a>    sub <span class="m">is_latin_1</span> <span class="s">{</span>    <span class="c"># But not ASCII; not C1</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[\N{U+A0}-\N{U+FF}]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>And here are some alternative portable ways to write them:</p>
<pre class="verbatim"><ol><li><a name="Is_c0"></a>    sub <span class="m">Is_c0</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/return.html">return</a> <span class="i">$char</span> =~ <span class="q">/[[:cntrl:]]/</span><span class="w">a</span> &amp;&amp; ! <span class="i">Is_delete</span><span class="s">(</span><span class="i">$char</span><span class="s">)</span><span class="sc">;</span></li><li></li><li>        <span class="c"># Alternatively:</span></li><li>        <span class="c"># return $char =~ /[[:cntrl:]]/</span></li><li>        <span class="c">#        &amp;&amp; $char =~ /[[:ascii:]]/</span></li><li>        <span class="c">#        &amp;&amp; ! Is_delete($char);</span></li><li>    <span class="s">}</span></li><li></li><li><a name="Is_print_ascii"></a>    sub <span class="m">Is_print_ascii</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li></li><li>        <a class="l_k" href="functions/return.html">return</a> <span class="i">$char</span> =~ <span class="q">/[[:print:]]/</span><span class="w">a</span><span class="sc">;</span></li><li></li><li>        <span class="c"># Alternatively:</span></li><li>        <span class="c"># return $char =~ /[[:print:]]/ &amp;&amp; $char =~ /[[:ascii:]]/;</span></li><li></li><li>        <span class="c"># Or</span></li><li>        <span class="c"># return $char</span></li><li>        <span class="c">#      =~ /[ !&quot;\#\$%&amp;&#39;()*+,\-.\/0-9:;&lt;=&gt;?\@A-Z[\\\]^_`a-z{|}~]/;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="Is_delete"></a>    sub <span class="m">Is_delete</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/return.html">return</a> <span class="i">utf8::native_to_unicode</span><span class="s">(</span><a class="l_k" href="functions/ord.html">ord</a> <span class="i">$char</span><span class="s">)</span> == <span class="n">0x7F</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="Is_c1"></a>    sub <span class="m">Is_c1</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/use.html">use</a> <span class="w">feature</span> <span class="q">&#39;unicode_strings&#39;</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/return.html">return</a> <span class="i">$char</span> =~ <span class="q">/[[:cntrl:]]/</span> &amp;&amp; <span class="i">$char</span> !~ <span class="q">/[[:ascii:]]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li><a name="Is_latin_1"></a>    sub <span class="m">Is_latin_1</span> <span class="s">{</span>    <span class="c"># But not ASCII; not C1</span></li><li>        <a class="l_k" href="functions/use.html">use</a> <span class="w">feature</span> <span class="q">&#39;unicode_strings&#39;</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/return.html">return</a> <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="i">$char</span><span class="s">)</span> &lt; <span class="n">256</span></li><li>               &amp;&amp; <span class="i">$char</span> !~ <span class="q">/[[:ascii:]]/</span></li><li>               &amp;&amp; <span class="i">$char</span> !~ <span class="q">/[[:cntrl:]]/</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>Another way to write <code class="inline"><span class="i">Is_latin_1</span><span class="s">(</span><span class="s">)</span></code>
 would be
to use the characters in the range explicitly:</p>
<pre class="verbatim"><ol><li><a name="Is_latin_1"></a>    sub <span class="m">Is_latin_1</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <span class="i">$char</span> =~ <span class="q">/[&nbsp;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;]</span></li><li>                  <span class="q">                  [&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;]/x</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>Although that form may run into trouble in network transit (due to the
presence of 8 bit characters) or on non ISO-Latin character sets.  But
it does allow <code class="inline"><span class="w">Is_c1</span></code>
 to be rewritten so it works on Perls that don't
have <code class="inline"><span class="q">&#39;unicode_strings&#39;</span></code>
 (earlier than v5.14):</p>
<pre class="verbatim"><ol><li><a name="Is_latin_1"></a>    sub <span class="m">Is_latin_1</span> <span class="s">{</span>    <span class="c"># But not ASCII; not C1</span></li><li>        <a class="l_k" href="functions/my.html">my</a> <span class="i">$char</span> = <a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><a class="l_k" href="functions/shift.html">shift</a><span class="cm">,</span><span class="n">0</span><span class="cm">,</span><span class="n">1</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/return.html">return</a> <a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="i">$char</span><span class="s">)</span> &lt; <span class="n">256</span></li><li>               &amp;&amp; <span class="i">$char</span> !~ <span class="q">/[[:ascii:]]/</span></li><li>               &amp;&amp; ! <span class="i">Is_latin1</span><span class="s">(</span><span class="i">$char</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><a name="SOCKETS"></a><h1>SOCKETS</h1>
<p>Most socket programming assumes ASCII character encodings in network
byte order.  Exceptions can include CGI script writing under a
host web server where the server may take care of translation for you.
Most host web servers convert EBCDIC data to ISO-8859-1 or Unicode on
output.</p>
<a name="SORTING"></a><h1>SORTING</h1>
<p>One big difference between ASCII-based character sets and EBCDIC ones
are the relative positions of the characters when sorted in native
order.  Of most concern are the upper- and lowercase letters, the
digits, and the underscore (<code class="inline"><span class="q">&quot;_&quot;</span></code>
).  On ASCII platforms the native sort
order has the digits come before the uppercase letters which come before
the underscore which comes before the lowercase letters.  On EBCDIC, the
underscore comes first, then the lowercase letters, then the uppercase
ones, and the digits last.  If sorted on an ASCII-based platform, the
two-letter abbreviation for a physician comes before the two letter
abbreviation for drive; that is:</p>
<pre class="verbatim"><ol><li> <span class="i">@sorted</span> = <a class="l_k" href="functions/sort.html">sort</a><span class="s">(</span><span class="q">qw(Dr. dr.)</span><span class="s">)</span><span class="sc">;</span>  <span class="c"># @sorted holds (&#39;Dr.&#39;,&#39;dr.&#39;) on ASCII,</span></li><li>                                  <span class="c"># but (&#39;dr.&#39;,&#39;Dr.&#39;) on EBCDIC</span></li></ol></pre><p>The property of lowercase before uppercase letters in EBCDIC is
even carried to the Latin 1 EBCDIC pages such as 0037 and 1047.
An example would be that "&#xcb;" (<code class="inline"><span class="w">E</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span></code>
, 203) comes
before "&#xeb;" (<code class="inline"><span class="w">e</span> <span class="w">WITH</span> <span class="w">DIAERESIS</span></code>
, 235) on an ASCII platform, but
the latter (83) comes before the former (115) on an EBCDIC platform.
(Astute readers will note that the uppercase version of "&#xdf;"
<code class="inline"><span class="w">SMALL</span> <span class="w">LETTER</span> <span class="w">SHARP</span> <span class="w">S</span></code>
 is simply "SS" and that the upper case versions
of "&#xff;" (small <code class="inline">y WITH DIAERESIS</code>) and "&#xb5;" (<code class="inline"><span class="w">MICRO</span> <span class="w">SIGN</span></code>
)
are not in the 0..255 range but are in Unicode, in a Unicode enabled
Perl).</p>
<p>The sort order will cause differences between results obtained on
ASCII platforms versus EBCDIC platforms.  What follows are some suggestions
on how to deal with these differences.</p>
<a name="Ignore-ASCII-vs.-EBCDIC-sort-differences."></a><h2>Ignore ASCII vs. EBCDIC sort differences.</h2>
<p>This is the least computationally expensive strategy.  It may require
some user education.</p>
<a name="Use-a-sort-helper-function"></a><h2>Use a sort helper function</h2>
<p>This is completely general, but the most computationally expensive
strategy.  Choose one or the other character set and transform to that
for every sort comparision.  Here's a complete example that transforms
to ASCII sort order:</p>
<pre class="verbatim"><ol><li><a name="native_to_uni"></a> sub <span class="m">native_to_uni($)</span> <span class="s">{</span></li><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$string</span> = <a class="l_k" href="functions/shift.html">shift</a><span class="sc">;</span></li><li></li><li>    <span class="c"># Saves time on an ASCII platform</span></li><li>    <a class="l_k" href="functions/return.html">return</a> <span class="i">$string</span> <a class="l_k" href="functions/if.html">if</a> <a class="l_k" href="functions/ord.html">ord</a> <span class="q">&#39;A&#39;</span> ==  <span class="n">65</span><span class="sc">;</span></li><li></li><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">$output</span> = <span class="q">&quot;&quot;</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/for.html">for</a> <a class="l_k" href="functions/my.html">my</a> <span class="i">$i</span> <span class="s">(</span><span class="n">0</span> .. <a class="l_k" href="functions/length.html">length</a><span class="s">(</span><span class="i">$string</span><span class="s">)</span> - <span class="n">1</span><span class="s">)</span> <span class="s">{</span></li><li>        <span class="i">$output</span></li><li>           .= <a class="l_k" href="functions/chr.html">chr</a><span class="s">(</span><span class="i">utf8::native_to_unicode</span><span class="s">(</span><a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><a class="l_k" href="functions/substr.html">substr</a><span class="s">(</span><span class="i">$string</span><span class="cm">,</span> <span class="i">$i</span><span class="cm">,</span> <span class="n">1</span><span class="s">)</span><span class="s">)</span><span class="s">)</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li></li><li>    <span class="c"># Preserve utf8ness of input onto the output, even if it didn&#39;t need</span></li><li>    <span class="c"># to be utf8</span></li><li>    <span class="i">utf8::upgrade</span><span class="s">(</span><span class="i">$output</span><span class="s">)</span> <a class="l_k" href="functions/if.html">if</a> <span class="i">utf8::is_utf8</span><span class="s">(</span><span class="i">$string</span><span class="s">)</span><span class="sc">;</span></li><li></li><li>    <a class="l_k" href="functions/return.html">return</a> <span class="i">$output</span><span class="sc">;</span></li><li> <span class="s">}</span></li><li></li><li><a name="ascii_order"></a> sub <span class="m">ascii_order</span> <span class="s">{</span>   <span class="c"># Sort helper</span></li><li>    <a class="l_k" href="functions/return.html">return</a> <span class="i">native_to_uni</span><span class="s">(</span><span class="i">$a</span><span class="s">)</span> <a class="l_k" href="functions/cmp.html">cmp</a> <span class="i">native_to_uni</span><span class="s">(</span><span class="i">$b</span><span class="s">)</span><span class="sc">;</span></li><li> <span class="s">}</span></li><li></li><li> <a class="l_k" href="functions/sort.html">sort</a> <span class="i">ascii_order</span> <span class="i">@list</span><span class="sc">;</span></li></ol></pre><a name="MONO-CASE-then-sort-data-(for-non-digits%2c-non-underscore)"></a><h2>MONO CASE then sort data (for non-digits, non-underscore)</h2>
<p>If you don't care about where digits and underscore sort to, you can do
something like this</p>
<pre class="verbatim"><ol><li><a name="case_insensitive_order"></a> sub <span class="m">case_insensitive_order</span> <span class="s">{</span>   <span class="c"># Sort helper</span></li><li>    <a class="l_k" href="functions/return.html">return</a> <a class="l_k" href="functions/lc.html">lc</a><span class="s">(</span><span class="i">$a</span><span class="s">)</span> <a class="l_k" href="functions/cmp.html">cmp</a> <a class="l_k" href="functions/lc.html">lc</a><span class="s">(</span><span class="i">$b</span><span class="s">)</span></li><li> <span class="s">}</span></li><li></li><li> <a class="l_k" href="functions/sort.html">sort</a> <span class="i">case_insensitive_order</span> <span class="i">@list</span><span class="sc">;</span></li></ol></pre><p>If performance is an issue, and you don't care if the output is in the
same case as the input, Use <code class="inline"><a class="l_k" href="functions/tr.html">tr///</a></code> to transform to the case most
employed within the data.  If the data are primarily UPPERCASE
non-Latin1, then apply <code class="inline"><a class="l_k" href="functions/tr.html">tr/[a-z]/[A-Z]/</a></code>, and then <code class="inline"><a class="l_k" href="functions/sort.html">sort()</a></code>.  If the
data are primarily lowercase non Latin1 then apply <code class="inline"><a class="l_k" href="functions/tr.html">tr/[A-Z]/[a-z]/</a></code>
before sorting.  If the data are primarily UPPERCASE and include Latin-1
characters then apply:</p>
<pre class="verbatim"><ol><li>   <span class="q">tr/[a-z]/[A-Z]/</span><span class="sc">;</span></li><li>   <span class="q">tr/[&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;]/[&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;/</span><span class="sc">;</span></li><li>   <span class="q">s/&szlig;/SS/g</span><span class="sc">;</span></li></ol></pre><p>then <code class="inline"><a class="l_k" href="functions/sort.html">sort()</a></code>.  If you have a choice, it's better to lowercase things
to avoid the problems of the two Latin-1 characters whose uppercase is
outside Latin-1: "&#xff;" (small <code class="inline">y WITH DIAERESIS</code>) and "&#xb5;"
(<code class="inline"><span class="w">MICRO</span> <span class="w">SIGN</span></code>
).  If you do need to upppercase, you can; with a
Unicode-enabled Perl, do:</p>
<pre class="verbatim"><ol><li>    <span class="q">tr/&yuml;/\x{178}/</span><span class="sc">;</span></li><li>    <span class="q">tr/&micro;/\x{39C}/</span><span class="sc">;</span></li></ol></pre><a name="Perform-sorting-on-one-type-of-platform-only."></a><h2>Perform sorting on one type of platform only.</h2>
<p>This strategy can employ a network connection.  As such
it would be computationally expensive.</p>
<a name="TRANSFORMATION-FORMATS"></a><h1>TRANSFORMATION FORMATS</h1>
<p>There are a variety of ways of transforming data with an intra character set
mapping that serve a variety of purposes.  Sorting was discussed in the
previous section and a few of the other more popular mapping techniques are
discussed next.</p>
<a name="URL-decoding-and-encoding"></a><h2>URL decoding and encoding</h2>
<p>Note that some URLs have hexadecimal ASCII code points in them in an
attempt to overcome character or protocol limitation issues.  For example
the tilde character is not on every keyboard hence a URL of the form:</p>
<pre class="verbatim"><ol><li>    http://www.pvhp.com/~pvhp/</li></ol></pre><p>may also be expressed as either of:</p>
<pre class="verbatim"><ol><li>    http://www.pvhp.com/%7Epvhp/</li><li></li><li>    http://www.pvhp.com/%7epvhp/</li></ol></pre><p>where 7E is the hexadecimal ASCII code point for "~".  Here is an example
of decoding such a URL in any EBCDIC code page:</p>
<pre class="verbatim"><ol><li>    <span class="i">$url</span> = <span class="q">&#39;<a href="http://www.pvhp.com/%7Epvhp/">http://www.pvhp.com/%7Epvhp/</a>&#39;</span><span class="sc">;</span></li><li>    <span class="i">$url</span> =~ <span class="q">s/%([0-9a-fA-F]{2})/</span></li><li>              <span class="q">              pack(&quot;c&quot;,utf8::unicode_to_native(hex($1)))/xge</span><span class="sc">;</span></li></ol></pre><p>Conversely, here is a partial solution for the task of encoding such
a URL in any EBCDIC code page:</p>
<pre class="verbatim"><ol><li>    <span class="i">$url</span> = <span class="q">&#39;<a href="http://www.pvhp.com/~pvhp/">http://www.pvhp.com/~pvhp/</a>&#39;</span><span class="sc">;</span></li><li>    <span class="c"># The following regular expression does not address the</span></li><li>    <span class="c"># mappings for: (&#39;.&#39; =&gt; &#39;%2E&#39;, &#39;/&#39; =&gt; &#39;%2F&#39;, &#39;:&#39; =&gt; &#39;%3A&#39;)</span></li><li>    <span class="i">$url</span> =~ <span class="q">s/([\t &quot;#%&amp;\(\),;&lt;=&gt;\?\@\[\\\]^`{|}~])/</span></li><li>               <span class="q">               sprintf(&quot;%%%02X&quot;,utf8::native_to_unicode(ord($1)))/xge</span><span class="sc">;</span></li></ol></pre><p>where a more complete solution would split the URL into components
and apply a full s/// substitution only to the appropriate parts.</p>
<a name="uu-encoding-and-decoding"></a><h2>uu encoding and decoding</h2>
<p>The <code class="inline"><span class="w">u</span></code>
 template to <code class="inline"><a class="l_k" href="functions/pack.html">pack()</a></code> or <code class="inline"><a class="l_k" href="functions/unpack.html">unpack()</a></code> will render EBCDIC data in
EBCDIC characters equivalent to their ASCII counterparts.  For example,
the following will print "Yes indeed\n" on either an ASCII or EBCDIC
computer:</p>
<pre class="verbatim"><ol><li>    $all_byte_chrs = '';</li><li>    for (0..255) { $all_byte_chrs .= chr($_); }</li><li>    $uuencode_byte_chrs = pack('u', $all_byte_chrs);</li><li>    ($uu = &lt;&lt;'ENDOFHEREDOC') =~ s/^\s*//gm;</li><li>    M``$"`P0%!@&lt;("0H+#`T.#Q`1$A,4%187&amp;!D:&amp;QP='A\@(2(C)"4F)R@I*BLL</li><li>    M+2XO,#$R,S0U-C&lt;X.3H[/#T^/T!!0D-$149'2$E*2TQ-3D]045)35%565UA9</li><li>    M6EM&lt;75Y?8&amp;%B8V1E9F=H:6IK;&amp;UN;W!Q&lt;G-T=79W&gt;'EZ&gt;WQ]?G^`@8*#A(6&amp;</li><li>    MAXB)BHN,C8Z/D)&amp;2DY25EI&gt;8F9J;G)V&gt;GZ"AHJ.DI::GJ*FJJZRMKJ^PL;*S</li><li>    MM+6VM[BYNKN\O;Z_P,'"P\3%QL?(R&lt;K+S,W.S]#1TM/4U=;7V-G:V]S=WM_@</li><li>    ?X&gt;+CY.7FY^CIZNOL[&gt;[O\/'R\_3U]O?X^?K[_/W^_P``</li><li>    ENDOFHEREDOC</li><li>    if ($uuencode_byte_chrs eq $uu) {</li><li>        print "Yes ";</li><li>    }</li><li>    $uudecode_byte_chrs = unpack('u', $uuencode_byte_chrs);</li><li>    if ($uudecode_byte_chrs eq $all_byte_chrs) {</li><li>        print "indeed\n";</li><li>    }</li></ol></pre><p>Here is a very spartan uudecoder that will work on EBCDIC:</p>
<pre class="verbatim"><ol><li>    <span class="c">#!/usr/local/bin/perl</span></li><li>    <span class="i">$_</span> = &lt;&gt; <a class="l_k" href="functions/until.html">until</a> <span class="s">(</span><span class="i">$mode</span><span class="cm">,</span><span class="i">$file</span><span class="s">)</span> = <span class="q">/^begin\s*(\d*)\s*(\S*)/</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/open.html">open</a><span class="s">(</span><span class="w">OUT</span><span class="cm">,</span> <span class="q">&quot;&gt; $file&quot;</span><span class="s">)</span> <a class="l_k" href="functions/if.html">if</a> <span class="i">$file</span> <a class="l_k" href="functions/ne.html">ne</a> <span class="q">&quot;&quot;</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/while.html">while</a><span class="s">(</span>&lt;&gt;<span class="s">)</span> <span class="s">{</span></li><li>        <a class="l_k" href="functions/last.html">last</a> <a class="l_k" href="functions/if.html">if</a> <span class="q">/^end/</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/next.html">next</a> <a class="l_k" href="functions/if.html">if</a> <span class="q">/[a-z]/</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/next.html">next</a> <a class="l_k" href="functions/unless.html">unless</a> <a class="l_k" href="functions/int.html">int</a><span class="s">(</span><span class="s">(</span><span class="s">(</span><span class="s">(</span><span class="i">utf8::native_to_unicode</span><span class="s">(</span><a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="s">)</span><span class="s">)</span> - <span class="n">32</span> <span class="s">)</span> &amp; <span class="n">077</span><span class="s">)</span></li><li>                                                               + <span class="n">2</span><span class="s">)</span> / <span class="n">3</span><span class="s">)</span></li><li>                    == <a class="l_k" href="functions/int.html">int</a><span class="s">(</span><a class="l_k" href="functions/length.html">length</a><span class="s">(</span><span class="s">)</span> / <span class="n">4</span><span class="s">)</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/print.html">print</a> <span class="i">OUT</span> <a class="l_k" href="functions/unpack.html">unpack</a><span class="s">(</span><span class="q">&quot;u&quot;</span><span class="cm">,</span> <span class="i">$_</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="s">}</span></li><li>    <a class="l_k" href="functions/close.html">close</a><span class="s">(</span><span class="w">OUT</span><span class="s">)</span><span class="sc">;</span></li><li>    <a class="l_k" href="functions/chmod.html">chmod</a> <a class="l_k" href="functions/oct.html">oct</a><span class="s">(</span><span class="i">$mode</span><span class="s">)</span><span class="cm">,</span> <span class="i">$file</span><span class="sc">;</span></li></ol></pre><a name="Quoted-Printable-encoding-and-decoding"></a><h2>Quoted-Printable encoding and decoding</h2>
<p>On ASCII-encoded platforms it is possible to strip characters outside of
the printable set using:</p>
<pre class="verbatim"><ol><li>    <span class="c"># This QP encoder works on ASCII only</span></li><li>    <span class="i">$qp_string</span> =~ <span class="q">s/([=\x00-\x1F\x80-\xFF])/</span></li><li>                    <span class="q">                    sprintf(&quot;=%02X&quot;,ord($1))/xge</span><span class="sc">;</span></li></ol></pre><p>Starting in Perl v5.22, this is trivially changeable to work portably on
both ASCII and EBCDIC platforms.</p>
<pre class="verbatim"><ol><li>    <span class="c"># This QP encoder works on both ASCII and EBCDIC</span></li><li>    <span class="i">$qp_string</span> =~ <span class="q">s/([=\N{U+00}-\N{U+1F}\N{U+80}-\N{U+FF}])/</span></li><li>                    <span class="q">                    sprintf(&quot;=%02X&quot;,ord($1))/xge</span><span class="sc">;</span></li></ol></pre><p>For earlier Perls, a QP encoder that works on both ASCII and EBCDIC
platforms would look somewhat like the following:</p>
<pre class="verbatim"><ol><li>    <span class="i">$delete</span> = <span class="i">utf8::unicode_to_native</span><span class="s">(</span><a class="l_k" href="functions/ord.html">ord</a><span class="s">(</span><span class="q">&quot;\x7F&quot;</span><span class="s">)</span><span class="s">)</span><span class="sc">;</span></li><li>    <span class="i">$qp_string</span> =~</li><li>      <span class="q">s/([^[:print:]$delete])/</span></li><li>         <span class="q">         sprintf(&quot;=%02X&quot;,utf8::native_to_unicode(ord($1)))/xage</span><span class="sc">;</span></li></ol></pre><p>(although in production code the substitutions might be done
in the EBCDIC branch with the function call and separately in the
ASCII branch without the expense of the identity map; in Perl v5.22, the
identity map is optimized out so there is no expense, but the
alternative above is simpler and is also available in v5.22).</p>
<p>Such QP strings can be decoded with:</p>
<pre class="verbatim"><ol><li>    <span class="c"># This QP decoder is limited to ASCII only</span></li><li>    <span class="i">$string</span> =~ <span class="q">s/=([[:xdigit:][[:xdigit:])/chr hex $1/ge</span><span class="sc">;</span></li><li>    <span class="i">$string</span> =~ <span class="q">s/=[\n\r]+$//</span><span class="sc">;</span></li></ol></pre><p>Whereas a QP decoder that works on both ASCII and EBCDIC platforms
would look somewhat like the following:</p>
<pre class="verbatim"><ol><li>    <span class="i">$string</span> =~ <span class="q">s/=([[:xdigit:][:xdigit:]])/</span></li><li>                                <span class="q">                                chr utf8::native_to_unicode(hex $1)/xge</span><span class="sc">;</span></li><li>    <span class="i">$string</span> =~ <span class="q">s/=[\n\r]+$//</span><span class="sc">;</span></li></ol></pre><a name="Caesarean-ciphers"></a><h2>Caesarean ciphers</h2>
<p>The practice of shifting an alphabet one or more characters for encipherment
dates back thousands of years and was explicitly detailed by Gaius Julius
Caesar in his <b>Gallic Wars</b> text.  A single alphabet shift is sometimes
referred to as a rotation and the shift amount is given as a number $n after
the string 'rot' or "rot$n".  Rot0 and rot26 would designate identity maps
on the 26-letter English version of the Latin alphabet.  Rot13 has the
interesting property that alternate subsequent invocations are identity maps
(thus rot13 is its own non-trivial inverse in the group of 26 alphabet
rotations).  Hence the following is a rot13 encoder and decoder that will
work on ASCII and EBCDIC platforms:</p>
<pre class="verbatim"><ol><li>    <span class="c">#!/usr/local/bin/perl</span></li><li></li><li>    while<span class="s">(</span>&lt;&gt;<span class="s">)</span><span class="s">{</span></li><li>        <span class="q">tr/n-za-mN-ZA-M/a-zA-Z/</span><span class="sc">;</span></li><li>        <a class="l_k" href="functions/print.html">print</a><span class="sc">;</span></li><li>    <span class="s">}</span></li></ol></pre><p>In one-liner form:</p>
<pre class="verbatim"><ol><li>    <span class="w">perl</span> -ne <span class="q">&#39;tr/n-za-mN-ZA-M/a-zA-Z/;print&#39;</span></li></ol></pre><a name="Hashing-order-and-checksums"></a><h1>Hashing order and checksums</h1>
<p>Perl deliberately randomizes hash order for security purposes on both
ASCII and EBCDIC platforms.</p>
<p>EBCDIC checksums will differ for the same file translated into ASCII
and vice versa.</p>
<a name="I18N-AND-L10N"></a><h1>I18N AND L10N</h1>
<p>Internationalization (I18N) and localization (L10N) are supported at least
in principle even on EBCDIC platforms.  The details are system-dependent
and discussed under the <a href="#OS-ISSUES">OS ISSUES</a> section below.</p>
<a name="MULTI-OCTET-CHARACTER-SETS"></a><h1>MULTI-OCTET CHARACTER SETS</h1>
<p>Perl works with UTF-EBCDIC, a multi-byte encoding.  In Perls earlier
than v5.22, there may be various bugs in this regard.</p>
<p>Legacy multi byte EBCDIC code pages XXX.</p>
<a name="OS-ISSUES"></a><h1>OS ISSUES</h1>
<p>There may be a few system-dependent issues
of concern to EBCDIC Perl programmers.</p>
<a name="OS%2f400"></a><h2>OS/400</h2>
<ul>
<li><a name="PASE"></a><b>PASE</b>
<p>The PASE environment is a runtime environment for OS/400 that can run
executables built for PowerPC AIX in OS/400; see <a href="perlos400.html">perlos400</a>.  PASE
is ASCII-based, not EBCDIC-based as the ILE.</p>
</li>
<li><a name="IFS-access"></a><b>IFS access</b>
<p>XXX.</p>
</li>
</ul>
<a name="OS%2f390%2c-z%2fOS"></a><h2>OS/390, z/OS</h2>
<p>Perl runs under Unix Systems Services or USS.</p>
<ul>
<li><a name="sigaction"></a><b><code class="inline"><span class="w">sigaction</span></code>
</b>
<p><code class="inline"><span class="w">SA_SIGINFO</span></code>
 can have segmentation faults.</p>
</li>
<li><a name="chcp"></a><b><code class="inline"><span class="w">chcp</span></code>
</b>
<p><b>chcp</b> is supported as a shell utility for displaying and changing
one's code page.  See also <i>chcp(1)</i>.</p>
</li>
<li><a name="dataset-access"></a><b>dataset access</b>
<p>For sequential data set access try:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">@ds_records</span> = <span class="q">`cat //DSNAME`</span><span class="sc">;</span></li></ol></pre><p>or:</p>
<pre class="verbatim"><ol><li>    <a class="l_k" href="functions/my.html">my</a> <span class="i">@ds_records</span> = <span class="q">`cat //&#39;HLQ.DSNAME&#39;`</span><span class="sc">;</span></li></ol></pre><p>See also the OS390::Stdio module on CPAN.</p>
</li>
<li><a name="iconv"></a><b><code class="inline"><span class="w">iconv</span></code>
</b>
<p><b>iconv</b> is supported as both a shell utility and a C RTL routine.
See also the <i>iconv(1)</i> and <i>iconv(3)</i> manual pages.</p>
</li>
<li><a name="locales"></a><b>locales</b>
<p>Locales are supported.  There may be glitches when a locale is another
EBCDIC code page which has some of the
<a href="#The-13-variant-characters">code-page variant characters</a> in other
positions.</p>
<p>There aren't currently any real UTF-8 locales, even though some locale
names contain the string "UTF-8".</p>
<p>See <a href="perllocale.html">perllocale</a> for information on locales.  The L10N files
are in <i>/usr/nls/locale</i>.  <code class="inline"><span class="i">$Config</span>{<span class="w">d_setlocale</span>}</code>
 is <code class="inline"><span class="q">&#39;define&#39;</span></code>
 on
OS/390 or z/OS.</p>
</li>
</ul>
<a name="POSIX-BC%3f"></a><h2>POSIX-BC?</h2>
<p>XXX.</p>
<a name="BUGS"></a><h1>BUGS</h1>
<ul>
<li>
<p>Not all shells will allow multiple <code class="inline">-e</code>
 string arguments to perl to
be concatenated together properly as recipes in this document
0, 2, 4, 5, and 6 might
seem to imply.</p>
</li>
<li>
<p>There are a significant number of test failures in the CPAN modules
shipped with Perl v5.22 and 5.24.  These are only in modules not primarily
maintained by Perl 5 porters.  Some of these are failures in the tests
only: they don't realize that it is proper to get different results on
EBCDIC platforms.  And some of the failures are real bugs.  If you
compile and do a <code class="inline"><span class="w">make</span> <span class="w">test</span></code>
 on Perl, all tests on the <code class="inline"><span class="q">/cpan</span></code>

directory are skipped.</p>
<p><a href="Encode.html">Encode</a> partially works.</p>
</li>
<li>
<p>In earlier Perl versions, when byte and character data were
concatenated, the new string was sometimes created by
decoding the byte strings as <i>ISO 8859-1 (Latin-1)</i>, even if the
old Unicode string used EBCDIC.</p>
</li>
</ul>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
<p><a href="perllocale.html">perllocale</a>, <a href="perlfunc.html">perlfunc</a>, <a href="perlunicode.html">perlunicode</a>, <a href="utf8.html">utf8</a>.</p>
<a name="REFERENCES"></a><h1>REFERENCES</h1>
<p><a href="http://anubis.dkuug.dk/i18n/charmaps">http://anubis.dkuug.dk/i18n/charmaps</a></p>
<p><a href="http://www.unicode.org/">http://www.unicode.org/</a></p>
<p><a href="http://www.unicode.org/unicode/reports/tr16/">http://www.unicode.org/unicode/reports/tr16/</a></p>
<p><a href="http://www.wps.com/projects/codes/">http://www.wps.com/projects/codes/</a>
<b>ASCII: American Standard Code for Information Infiltration</b> Tom Jennings,
September 1999.</p>
<p><b>The Unicode Standard, Version 3.0</b> The Unicode Consortium, Lisa Moore ed.,
ISBN 0-201-61633-5, Addison Wesley Developers Press, February 2000.</p>
<p><b>CDRA: IBM - Character Data Representation Architecture -
Reference and Registry</b>, IBM SC09-2190-00, December 1996.</p>
<p>"Demystifying Character Sets", Andrea Vine, Multilingual Computing
&amp; Technology, <b>#26 Vol. 10 Issue 4</b>, August/September 1999;
ISSN 1523-0309; Multilingual Computing Inc. Sandpoint ID, USA.</p>
<p><b>Codes, Ciphers, and Other Cryptic and Clandestine Communication</b>
Fred B. Wrixon, ISBN 1-57912-040-7, Black Dog &amp; Leventhal Publishers,
1998.</p>
<p><a href="http://www.bobbemer.com/P-BIT.HTM">http://www.bobbemer.com/P-BIT.HTM</a>
<b>IBM - EBCDIC and the P-bit; The biggest Computer Goof Ever</b> Robert Bemer.</p>
<a name="HISTORY"></a><h1>HISTORY</h1>
<p>15 April 2001: added UTF-8 and UTF-EBCDIC to main table, pvhp.</p>
<a name="AUTHOR"></a><h1>AUTHOR</h1>
<p>Peter Prymmer pvhp@best.com wrote this in 1999 and 2000
with CCSID 0819 and 0037 help from Chris Leach and
Andr&#xe9; Pirard A.Pirard@ulg.ac.be as well as POSIX-BC
help from Thomas Dorner Thomas.Dorner@start.de.
Thanks also to Vickie Cooper, Philip Newton, William Raffloer, and
Joe Smith.  Trademarks, registered trademarks, service marks and
registered service marks used in this document are the property of
their respective owners.</p>
<p>Now maintained by Perl5 Porters.</p>




  <div id="page_index" class="hud_container">
    <div id="page_index_header" class="hud_header">
      <div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
      <div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
      <div id="page_index_topright" class="hud_topright"></div>
    </div>
    <div id="page_index_content" class="hud_content">
      <ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#COMMON-CHARACTER-CODE-SETS">COMMON CHARACTER CODE SETS</a><ul><li><a href="#ASCII">ASCII</a><li><a href="#ISO-8859">ISO 8859</a><li><a href="#Latin-1-(ISO-8859-1)">Latin 1 (ISO 8859-1)</a><li><a href="#EBCDIC">EBCDIC</a><li><a href="#Unicode-code-points-versus-EBCDIC-code-points">Unicode code points versus EBCDIC code points</a><li><a href="#Unicode-and-UTF">Unicode and UTF</a><li><a href="#Using-Encode">Using Encode</a></ul><li><a href="#SINGLE-OCTET-TABLES">SINGLE OCTET TABLES</a><ul><li><a href="#Table-in-hex%2c-sorted-in-1047-order">Table in hex, sorted in 1047 order</a></ul><li><a href="#IDENTIFYING-CHARACTER-CODE-SETS">IDENTIFYING CHARACTER CODE SETS</a><li><a href="#CONVERSIONS">CONVERSIONS</a><ul><li><a href="#utf8%3a%3aunicode_to_native()-and-utf8%3a%3anative_to_unicode()">utf8::unicode_to_native() and utf8::native_to_unicode()</a><li><a href="#tr%2f%2f%2f">tr///</a><li><a href="#iconv">iconv</a><li><a href="#C-RTL">C RTL</a></ul><li><a href="#OPERATOR-DIFFERENCES">OPERATOR DIFFERENCES</a><li><a href="#FUNCTION-DIFFERENCES">FUNCTION DIFFERENCES</a><li><a href="#REGULAR-EXPRESSION-DIFFERENCES">REGULAR EXPRESSION DIFFERENCES</a><li><a href="#SOCKETS">SOCKETS</a><li><a href="#SORTING">SORTING</a><ul><li><a href="#Ignore-ASCII-vs.-EBCDIC-sort-differences.">Ignore ASCII vs. EBCDIC sort differences.</a><li><a href="#Use-a-sort-helper-function">Use a sort helper function</a><li><a href="#MONO-CASE-then-sort-data-(for-non-digits%2c-non-underscore)">MONO CASE then sort data (for non-digits, non-underscore)</a><li><a href="#Perform-sorting-on-one-type-of-platform-only.">Perform sorting on one type of platform only.</a></ul><li><a href="#TRANSFORMATION-FORMATS">TRANSFORMATION FORMATS</a><ul><li><a href="#URL-decoding-and-encoding">URL decoding and encoding</a><li><a href="#uu-encoding-and-decoding">uu encoding and decoding</a><li><a href="#Quoted-Printable-encoding-and-decoding">Quoted-Printable encoding and decoding</a><li><a href="#Caesarean-ciphers">Caesarean ciphers</a></ul><li><a href="#Hashing-order-and-checksums">Hashing order and checksums</a><li><a href="#I18N-AND-L10N">I18N AND L10N</a><li><a href="#MULTI-OCTET-CHARACTER-SETS">MULTI-OCTET CHARACTER SETS</a><li><a href="#OS-ISSUES">OS ISSUES</a><ul><li><a href="#OS%2f400">OS/400</a><li><a href="#OS%2f390%2c-z%2fOS">OS/390, z/OS</a><li><a href="#POSIX-BC%3f">POSIX-BC?</a></ul><li><a href="#BUGS">BUGS</a><li><a href="#SEE-ALSO">SEE ALSO</a><li><a href="#REFERENCES">REFERENCES</a><li><a href="#HISTORY">HISTORY</a><li><a href="#AUTHOR">AUTHOR</a></ul>
    </div>
    <div id="page_index_footer" class="hud_footer">
      <div id="page_index_bottomleft" class="hud_bottomleft"></div>
      <div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
      <div id="page_index_resize" class="hud_resize"></div>
    </div>
  </div>


	    &nbsp;
          </div>
          <div id="content_footer">
          </div>
        </div>
        <div class="clear"></div>
      </div>
      
    <div id="footer">
      <div id="footer_content">
        <div id="footer_strapline">
          perldoc.perl.org - Official documentation for the Perl programming language
        </div>
        <div id="footer_links">
          <div id="address">
            <p class="name">Contact details</p>
            <p class="address">
	      Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
	    </p>
            <p class="contact">
              Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
            </p>
          </div>
          <ul class="f1">
            <li>Manual
              <ul class="f2">
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">Changes</a>
              </ul>
            <li>Reference
              <ul class="f2">
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Variables</a>
              </ul>
            <li>Modules
              <ul class="f2">
                <li><a href="index-modules-A.html">Modules</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
              </ul>
            <li>Misc
              <ul class="f2">
                <li><a href="index-licence.html">License</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platforms</a>
              </ul>          </ul>
          <div class="clear"></div>
        </div>
      </div>
      <div id="footer_end">
      </div>
    </div>
      
    </div>
      <script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
      <script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
  perldoc.setPath(0);
  perldoc.pageName    = 'perlebcdic';
  perldoc.pageAddress = 'perlebcdic.html';
  perldoc.contentPage = 1;
  explorePerl.render();
  explorePerl.addEvents('explore_anchor');
</script>
    
  </body>
</html>