-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.jsx
12411 lines (12411 loc) · 847 KB
/
test.jsx
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
html({"class": "client-nojs", dir: "ltr", lang: "en"},
head({},
"\n",
meta({charset: "UTF-8"}),
"\n",
title({}, "ISO/IEC 2022 - Wikipedia"),
"\n",
script({}, "document.documentElement.className=\"client-js\";RLCONF={\"wgCanonicalNamespace\":\"\",\"wgCanonicalSpecialPageName\":!1,\"wgNamespaceNumber\":0,\"wgPageName\":\"ISO/IEC_2022\",\"wgTitle\":\"ISO/IEC 2022\",\"wgCurRevisionId\":916257617,\"wgRevisionId\":916257617,\"wgArticleId\":493590,\"wgIsArticle\":!0,\"wgIsRedirect\":!1,\"wgAction\":\"view\",\"wgUserName\":null,\"wgUserGroups\":[\"*\"],\"wgCategories\":[\"Articles with short description\",\"Use British English Oxford spelling from December 2011\",\"Articles needing additional references from September 2019\",\"All articles needing additional references\",\"Articles containing Japanese-language text\",\"Articles containing Chinese-language text\",\"All articles with unsourced statements\",\"Articles with unsourced statements from October 2013\",\"Articles with unsourced statements from January 2013\",\"All articles lacking reliable references\",\"Articles lacking reliable references from September 2015\",\"Pages using RFC magic links\",\"Character sets\",\"Ecma standards\",\"ISO/IEC standards\"\n],\"wgBreakFrames\":!1,\"wgPageContentLanguage\":\"en\",\"wgPageContentModel\":\"wikitext\",\"wgSeparatorTransformTable\":[\"\",\"\"],\"wgDigitTransformTable\":[\"\",\"\"],\"wgDefaultDateFormat\":\"dmy\",\"wgMonthNames\":[\"\",\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],\"wgMonthNamesShort\":[\"\",\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],\"wgRelevantPageName\":\"ISO/IEC_2022\",\"wgRelevantArticleId\":493590,\"wgRequestId\":\"XYFlTApAADgAAAbucbMAAABD\",\"wgCSPNonce\":!1,\"wgIsProbablyEditable\":!0,\"wgRelevantPageIsProbablyEditable\":!0,\"wgRestrictionEdit\":[],\"wgRestrictionMove\":[],\"wgMediaViewerOnClick\":!0,\"wgMediaViewerEnabledByDefault\":!0,\"wgPopupsReferencePreviews\":!1,\"wgPopupsConflictsWithNavPopupGadget\":!1,\"wgVisualEditor\":{\"pageLanguageCode\":\"en\",\"pageLanguageDir\":\"ltr\",\"pageVariantFallbacks\":\"en\"},\"wgMFDisplayWikibaseDescriptions\":{\"search\":!0,\"nearby\":!0,\"watchlist\":!0,\"tagline\":!1},\n\"wgWMESchemaEditAttemptStepOversample\":!1,\"wgPoweredByHHVM\":!0,\"wgULSCurrentAutonym\":\"English\",\"wgNoticeProject\":\"wikipedia\",\"wgWikibaseItemId\":\"Q1197730\",\"wgCentralAuthMobileDomain\":!1,\"wgEditSubmitButtonLabelPublish\":!0};RLSTATE={\"ext.gadget.charinsert-styles\":\"ready\",\"ext.globalCssJs.user.styles\":\"ready\",\"site.styles\":\"ready\",\"noscript\":\"ready\",\"user.styles\":\"ready\",\"ext.globalCssJs.user\":\"ready\",\"user\":\"ready\",\"user.options\":\"ready\",\"user.tokens\":\"loading\",\"ext.cite.styles\":\"ready\",\"mediawiki.legacy.shared\":\"ready\",\"mediawiki.legacy.commonPrint\":\"ready\",\"jquery.makeCollapsible.styles\":\"ready\",\"mediawiki.toc.styles\":\"ready\",\"wikibase.client.init\":\"ready\",\"ext.visualEditor.desktopArticleTarget.noscript\":\"ready\",\"ext.uls.interlanguage\":\"ready\",\"ext.wikimediaBadges\":\"ready\",\"ext.3d.styles\":\"ready\",\"mediawiki.skinning.interface\":\"ready\",\"skins.vector.styles\":\"ready\"};RLPAGEMODULES=[\"ext.cite.ux-enhancements\",\"site\",\"mediawiki.page.startup\",\"mediawiki.page.ready\",\n\"jquery.makeCollapsible\",\"mediawiki.toc\",\"mediawiki.searchSuggest\",\"ext.gadget.teahouse\",\"ext.gadget.ReferenceTooltips\",\"ext.gadget.watchlist-notice\",\"ext.gadget.DRN-wizard\",\"ext.gadget.charinsert\",\"ext.gadget.refToolbar\",\"ext.gadget.extra-toolbar-buttons\",\"ext.gadget.switcher\",\"ext.centralauth.centralautologin\",\"mmv.head\",\"mmv.bootstrap.autostart\",\"ext.popups\",\"ext.visualEditor.desktopArticleTarget.init\",\"ext.visualEditor.targetLoader\",\"ext.eventLogging\",\"ext.wikimediaEvents\",\"ext.navigationTiming\",\"ext.uls.compactlinks\",\"ext.uls.interface\",\"ext.cx.eventlogging.campaigns\",\"ext.quicksurveys.init\",\"ext.centralNotice.geoIP\",\"ext.centralNotice.startUp\",\"skins.vector.js\"];"),
"\n",
script({}, "(RLQ=window.RLQ||[]).push(function(){mw.loader.implement(\"user.tokens@tffin\",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({\"editToken\":\"+\\\\\",\"patrolToken\":\"+\\\\\",\"watchToken\":\"+\\\\\",\"csrfToken\":\"+\\\\\"});\n});});"),
"\n",
link({href: "/w/load.php?lang=en&modules=ext.3d.styles%7Cext.cite.styles%7Cext.uls.interlanguage%7Cext.wikimediaBadges%7Cjquery.makeCollapsible.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cmediawiki.toc.styles%7Cskins.vector.styles%7Cwikibase.client.init&only=styles&skin=vector", rel: "stylesheet"}),
"\n",
link({href: "/w/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript&only=styles&skin=vector", rel: "stylesheet"}),
"\n",
script({async: "", src: "/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector"}),
"\n",
meta({content: "", name: "ResourceLoaderDynamicStyles"}),
"\n",
link({href: "/w/load.php?lang=en&modules=ext.gadget.charinsert-styles&only=styles&skin=vector", rel: "stylesheet"}),
"\n",
link({href: "/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector", rel: "stylesheet"}),
"\n",
meta({content: "MediaWiki 1.34.0-wmf.22", name: "generator"}),
"\n",
meta({content: "origin", name: "referrer"}),
"\n",
meta({content: "origin-when-crossorigin", name: "referrer"}),
"\n",
meta({content: "origin-when-cross-origin", name: "referrer"}),
"\n",
link({href: "android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/ISO/IEC_2022", rel: "alternate"}),
"\n",
link({href: "/w/index.php?title=ISO/IEC_2022&action=edit", rel: "alternate", title: "Edit this page", type: "application/x-wiki"}),
"\n",
link({href: "/w/index.php?title=ISO/IEC_2022&action=edit", rel: "edit", title: "Edit this page"}),
"\n",
link({href: "/static/apple-touch/wikipedia.png", rel: "apple-touch-icon"}),
"\n",
link({href: "/static/favicon/wikipedia.ico", rel: "shortcut icon"}),
"\n",
link({href: "/w/opensearch_desc.php", rel: "search", title: "Wikipedia (en)", type: "application/opensearchdescription+xml"}),
"\n",
link({href: "//en.wikipedia.org/w/api.php?action=rsd", rel: "EditURI", type: "application/rsd+xml"}),
"\n",
link({href: "//creativecommons.org/licenses/by-sa/3.0/", rel: "license"}),
"\n",
link({href: "https://en.wikipedia.org/wiki/ISO/IEC_2022", rel: "canonical"}),
"\n",
link({href: "//login.wikimedia.org", rel: "dns-prefetch"}),
"\n",
link({href: "//meta.wikimedia.org", rel: "dns-prefetch"}),
"\n"
/*[if lt IE 9]><script src="/w/resources/lib/html5shiv/html5shiv.js"></script><![endif]*/,
"\n"
),
"\n",
body({"class": "mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-ISO_IEC_2022 rootpage-ISO_IEC_2022 skin-vector action-view"},
"\n",
div({"class": "noprint", id: "mw-page-base"}),
"\n",
div({"class": "noprint", id: "mw-head-base"}),
"\n",
div({"class": "mw-body", id: "content", role: "main"},
"\n\t",
a({id: "top"}),
"\n\t",
div({"class": "mw-body-content", id: "siteNotice"}
/* CentralNotice */
),
"\n\t",
div({"class": "mw-indicators mw-body-content"}, "\n"),
"\n\n\t",
h1({"class": "firstHeading", id: "firstHeading", lang: "en"}, "ISO/IEC 2022"),
"\n\t\n\t",
div({"class": "mw-body-content", id: "bodyContent"},
"\n\t\t",
div({"class": "noprint", id: "siteSub"}, "From Wikipedia, the free encyclopedia"),
"\n\t\t",
div({id: "contentSub"}),
"\n\t\t\n\t\t\n\t\t\n\t\t",
div({id: "jump-to-nav"}),
"\n\t\t",
a({"class": "mw-jump-link", href: "#mw-head"}, "Jump to navigation"),
"\n\t\t",
a({"class": "mw-jump-link", href: "#p-search"}, "Jump to search"),
"\n\t\t",
div({"class": "mw-content-ltr", dir: "ltr", id: "mw-content-text", lang: "en"},
div({"class": "mw-parser-output"},
div({"class": "shortdescription nomobile noexcerpt noprint searchaux", style: "display:none"}, "Higher-level 7-bit and 8-bit character encoding system"),
"\n",
p({"class": "mw-empty-elt"}, "\n"),
"\n",
div({"class": "hatnote navigation-not-searchable", role: "note"},
"Not to be confused with ",
a({href: "/wiki/ISO_20022", title: "ISO 20022"}, "ISO 20022"),
"."
),
"\n",
style({"data-mw-deduplicate": "TemplateStyles:r886049734"}, ".mw-parser-output .monospaced{font-family:monospace,monospace}"),
table({"class": "infobox", style: "width:22em"},
caption({}, "ISO 2022"),
tbody({},
tr({},
th({scope: "row"}, "Language(s)"),
td({}, "Various.")
),
tr({},
th({scope: "row"}, "Standard"),
td({},
"ISO/IEC 2022, ",
br({}),
"ECMA-35, ",
br({}),
"JIS X 0202"
)
),
tr({},
th({scope: "row"}, "Classification"),
td({},
a({href: "/wiki/State_(computer_science)", title: "State (computer science)"}, "Stateful"),
" ",
a({href: "/wiki/Character_encoding", title: "Character encoding"}, "encoding")
)
),
tr({},
th({scope: "row"}, "Transforms / Encodes"),
td({},
a({"class": "mw-redirect", href: "/wiki/US-ASCII", title: "US-ASCII"}, "US-ASCII"),
" ",
"and, depending on implementation:\n",
ul({},
li({},
a({href: "/wiki/GB_2312", title: "GB 2312"}, "GB 2312")
),
"\n",
li({},
a({href: "/wiki/JIS_X_0201", title: "JIS X 0201"}, "JIS X 0201")
),
"\n",
li({},
a({href: "/wiki/JIS_X_0208", title: "JIS X 0208"}, "JIS X 0208")
),
"\n",
li({},
a({href: "/wiki/JIS_X_0212", title: "JIS X 0212"}, "JIS X 0212")
),
"\n",
li({},
a({href: "/wiki/JIS_X_0213", title: "JIS X 0213"}, "JIS X 0213")
),
"\n",
li({},
a({href: "/wiki/KS_X_1001", title: "KS X 1001"}, "KS X 1001")
),
"\n",
li({},
a({href: "/wiki/CNS_11643", title: "CNS 11643"}, "CNS 11643")
),
"\n",
li({},
a({"class": "mw-redirect", href: "/wiki/ISO_646", title: "ISO 646"}, "ISO 646")
),
"\n",
li({},
a({"class": "mw-redirect", href: "/wiki/ISO_8859", title: "ISO 8859"}, "ISO 8859")
),
"\n",
li({}, "Various others")
),
"\n"
)
),
tr({},
th({scope: "row"}, "Succeeded by"),
td({},
a({"class": "mw-redirect", href: "/wiki/ISO_10646", title: "ISO 10646"}, "ISO 10646"),
" ",
"(",
a({href: "/wiki/Unicode", title: "Unicode"}, "Unicode"),
")"
)
),
tr({},
td({colspan: "2", style: "text-align:right"},
div({"class": "plainlinks hlist navbar mini"},
ul({},
li({"class": "nv-view"},
a({href: "/wiki/Template:Infobox_character_encoding", title: "Template:Infobox character encoding"},
abbr({title: "View this template"}, "v")
)
),
li({"class": "nv-talk"},
a({href: "/wiki/Template_talk:Infobox_character_encoding", title: "Template talk:Infobox character encoding"},
abbr({title: "Discuss this template"}, "t")
)
),
li({"class": "nv-edit"},
a({"class": "external text", href: "https://en.wikipedia.org/w/index.php?title=Template:Infobox_character_encoding&action=edit"},
abbr({title: "Edit this template"}, "e")
)
)
)
)
)
)
)
),
"\n",
p({},
b({}, "ISO/IEC 2022"),
" ",
i({}, "Information technology\u2014Character code structure and extension techniques"),
", is an ",
a({href: "/wiki/International_Organization_for_Standardization", title: "International Organization for Standardization"}, "ISO"),
" ",
"standard (equivalent to the ",
a({href: "/wiki/Ecma_International", title: "Ecma International"}, "ECMA"),
" ",
"standard ",
b({}, "ECMA-35"),
sup({"class": "reference", id: "cite_ref-1"},
a({href: "#cite_note-1"},
"[",
"1",
"]"
)
),
") specifying\n"
),
"\n",
ul({},
li({},
"a technique for including multiple character sets in a single ",
a({href: "/wiki/Character_encoding", title: "Character encoding"}, "character encoding"),
" ",
"system, and"
),
"\n",
li({}, "a technique for representing these character sets in both 7 and 8 bit systems using the same encoding.")
),
"\n",
p({}, "Many of the character sets included as ISO/IEC 2022 encodings are 'double byte' encodings where two bytes correspond to a single character. This makes ISO-2022 a variable width encoding. But a specific implementation does not have to implement all of the standard; the conformance level and the supported character sets are defined by the implementation.\n"),
"\n",
div({"class": "toc", id: "toc"},
input({"class": "toctogglecheckbox", id: "toctogglecheckbox", role: "button", style: "display:none", type: "checkbox"}),
div({"class": "toctitle", dir: "ltr", lang: "en"},
h2({}, "Contents"),
span({"class": "toctogglespan"},
label({"class": "toctogglelabel", "for": "toctogglecheckbox"})
)
),
"\n",
ul({},
"\n",
li({"class": "toclevel-1 tocsection-1"},
a({href: "#Introduction"},
span({"class": "tocnumber"}, "1"),
" ",
span({"class": "toctext"}, "Introduction")
)
),
"\n",
li({"class": "toclevel-1 tocsection-2"},
a({href: "#Code_structure"},
span({"class": "tocnumber"}, "2"),
" ",
span({"class": "toctext"}, "Code structure")
),
"\n",
ul({},
"\n",
li({"class": "toclevel-2 tocsection-3"},
a({href: "#Notation_and_nomenclature"},
span({"class": "tocnumber"}, "2.1"),
" ",
span({"class": "toctext"}, "Notation and nomenclature")
)
),
"\n",
li({"class": "toclevel-2 tocsection-4"},
a({href: "#Fixed_coded_characters"},
span({"class": "tocnumber"}, "2.2"),
" ",
span({"class": "toctext"}, "Fixed coded characters")
)
),
"\n",
li({"class": "toclevel-2 tocsection-5"},
a({href: "#Graphical_character_sets"},
span({"class": "tocnumber"}, "2.3"),
" ",
span({"class": "toctext"}, "Graphical character sets")
)
),
"\n",
li({"class": "toclevel-2 tocsection-6"},
a({href: "#Combining_characters"},
span({"class": "tocnumber"}, "2.4"),
" ",
span({"class": "toctext"}, "Combining characters")
)
),
"\n",
li({"class": "toclevel-2 tocsection-7"},
a({href: "#Control_character_sets"},
span({"class": "tocnumber"}, "2.5"),
" ",
span({"class": "toctext"}, "Control character sets")
)
),
"\n",
li({"class": "toclevel-2 tocsection-8"},
a({href: "#Other_control_functions"},
span({"class": "tocnumber"}, "2.6"),
" ",
span({"class": "toctext"}, "Other control functions")
)
),
"\n",
li({"class": "toclevel-2 tocsection-9"},
a({href: "#Shift_functions"},
span({"class": "tocnumber"}, "2.7"),
" ",
span({"class": "toctext"}, "Shift functions")
)
),
"\n",
li({"class": "toclevel-2 tocsection-10"},
a({href: "#Character_set_designations"},
span({"class": "tocnumber"}, "2.8"),
" ",
span({"class": "toctext"}, "Character set designations")
)
),
"\n"
),
"\n"
),
"\n",
li({"class": "toclevel-1 tocsection-11"},
a({href: "#ISO/IEC_2022_code_versions"},
span({"class": "tocnumber"}, "3"),
" ",
span({"class": "toctext"}, "ISO/IEC 2022 code versions")
),
"\n",
ul({},
"\n",
li({"class": "toclevel-2 tocsection-12"},
a({href: "#Japanese_e-mail_versions"},
span({"class": "tocnumber"}, "3.1"),
" ",
span({"class": "toctext"}, "Japanese e-mail versions")
)
),
"\n",
li({"class": "toclevel-2 tocsection-13"},
a({href: "#Other_7-bit_versions"},
span({"class": "tocnumber"}, "3.2"),
" ",
span({"class": "toctext"}, "Other 7-bit versions")
)
),
"\n",
li({"class": "toclevel-2 tocsection-14"},
a({href: "#ISO/IEC_4873"},
span({"class": "tocnumber"}, "3.3"),
" ",
span({"class": "toctext"}, "ISO/IEC 4873")
)
),
"\n",
li({"class": "toclevel-2 tocsection-15"},
a({href: "#Extended_Unix_Code"},
span({"class": "tocnumber"}, "3.4"),
" ",
span({"class": "toctext"}, "Extended Unix Code")
)
),
"\n"
),
"\n"
),
"\n",
li({"class": "toclevel-1 tocsection-16"},
a({href: "#Comparison_with_other_encodings"},
span({"class": "tocnumber"}, "4"),
" ",
span({"class": "toctext"}, "Comparison with other encodings")
),
"\n",
ul({},
"\n",
li({"class": "toclevel-2 tocsection-17"},
a({href: "#Advantages"},
span({"class": "tocnumber"}, "4.1"),
" ",
span({"class": "toctext"}, "Advantages")
)
),
"\n",
li({"class": "toclevel-2 tocsection-18"},
a({href: "#Disadvantages"},
span({"class": "tocnumber"}, "4.2"),
" ",
span({"class": "toctext"}, "Disadvantages")
)
),
"\n"
),
"\n"
),
"\n",
li({"class": "toclevel-1 tocsection-19"},
a({href: "#See_also"},
span({"class": "tocnumber"}, "5"),
" ",
span({"class": "toctext"}, "See also")
)
),
"\n",
li({"class": "toclevel-1 tocsection-20"},
a({href: "#Footnotes"},
span({"class": "tocnumber"}, "6"),
" ",
span({"class": "toctext"}, "Footnotes")
)
),
"\n",
li({"class": "toclevel-1 tocsection-21"},
a({href: "#References"},
span({"class": "tocnumber"}, "7"),
" ",
span({"class": "toctext"}, "References")
)
),
"\n",
li({"class": "toclevel-1 tocsection-22"},
a({href: "#External_links"},
span({"class": "tocnumber"}, "8"),
" ",
span({"class": "toctext"}, "External links")
)
),
"\n"
),
"\n"
),
"\n\n",
h2({},
span({"class": "mw-headline", id: "Introduction"}, "Introduction"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=1", title: "Edit section: Introduction"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
table({"class": "box-Unreferenced plainlinks metadata ambox ambox-content ambox-Unreferenced", role: "presentation"},
tbody({},
tr({},
td({"class": "mbox-image"},
div({style: "width:52px"},
a({"class": "image", href: "/wiki/File:Question_book-new.svg"},
img({alt: "", "data-file-height": "399", "data-file-width": "512", decoding: "async", height: "39", src: "//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/50px-Question_book-new.svg.png", srcset: "//upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/75px-Question_book-new.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/99/Question_book-new.svg/100px-Question_book-new.svg.png 2x", width: "50"})
)
)
),
td({"class": "mbox-text"},
div({"class": "mbox-text-span"},
"This section ",
b({},
"does not ",
a({href: "/wiki/Wikipedia:Citing_sources", title: "Wikipedia:Citing sources"}, "cite"),
" ",
"any ",
a({href: "/wiki/Wikipedia:Verifiability", title: "Wikipedia:Verifiability"}, "sources")
),
".",
span({"class": "hide-when-compact"},
" ",
"Please help ",
a({"class": "external text", href: "https://en.wikipedia.org/w/index.php?title=ISO/IEC_2022&action=edit"}, "improve this section"),
" ",
"by ",
a({href: "/wiki/Help:Introduction_to_referencing_with_Wiki_Markup/1", title: "Help:Introduction to referencing with Wiki Markup/1"}, "adding citations to reliable sources"),
". Unsourced material may be challenged and ",
a({href: "/wiki/Wikipedia:Verifiability#Burden_of_evidence", title: "Wikipedia:Verifiability"}, "removed"),
"."
),
" ",
small({"class": "date-container"},
i({},
"(",
span({"class": "date"}, "September 2019"),
")"
)
),
small({"class": "hide-when-compact"},
i({},
" ",
"(",
a({href: "/wiki/Help:Maintenance_template_removal", title: "Help:Maintenance template removal"}, "Learn how and when to remove this template message"),
")"
)
)
)
)
)
)
),
"\n",
p({},
"Many languages or ",
a({href: "/wiki/Language_family", title: "Language family"}, "language families"),
" ",
"not based on the ",
a({href: "/wiki/Latin_alphabet", title: "Latin alphabet"}, "Latin alphabet"),
" ",
"such as ",
a({href: "/wiki/Greek_language", title: "Greek language"}, "Greek"),
", ",
a({"class": "mw-redirect", href: "/wiki/Cyrillic", title: "Cyrillic"}, "Cyrillic"),
", ",
a({"class": "mw-redirect", href: "/wiki/Arabic_language", title: "Arabic language"}, "Arabic"),
", or ",
a({href: "/wiki/Hebrew_language", title: "Hebrew language"}, "Hebrew"),
" ",
"have historically been represented on computers with different 8-bit ",
a({href: "/wiki/Extended_ASCII", title: "Extended ASCII"}, "extended ASCII"),
" ",
"encodings. Written ",
a({"class": "mw-redirect", href: "/wiki/East_Asian", title: "East Asian"}, "East Asian"),
" ",
"languages, specifically ",
a({href: "/wiki/Chinese_language", title: "Chinese language"}, "Chinese"),
", ",
a({href: "/wiki/Japanese_language", title: "Japanese language"}, "Japanese"),
", and ",
a({href: "/wiki/Korean_language", title: "Korean language"}, "Korean"),
", use far more characters than can be represented in an 8-",
a({href: "/wiki/Bit", title: "Bit"}, "bit"),
" ",
"computer ",
a({href: "/wiki/Byte", title: "Byte"}, "byte"),
" ",
"and were first represented on computers with language-specific ",
a({href: "/wiki/DBCS", title: "DBCS"}, "double byte encodings"),
".\n"
),
p({}, "ISO/IEC 2022 was developed as a technique to attack both of these problems: to represent characters in multiple character sets within a single character encoding, and to represent large character sets.\n"),
p({}, "A second requirement of ISO-2022 was that it should be compatible with 7-bit communication channels. So even though ISO-2022 is an 8-bit character set any 8-bit sequence can be reencoded to use only 7-bits without loss and normally only a small increase in size.\n"),
p({},
"To represent multiple character sets, the ISO/IEC 2022 character encodings include ",
a({href: "/wiki/Escape_sequence", title: "Escape sequence"}, "escape sequences"),
" ",
"which indicate the character set for characters which follow. The escape sequences are registered with ISO and follow the patterns defined within the standard. These character encodings require data to be processed sequentially in a forward direction since the correct interpretation of the data depends on previously encountered escape sequences. Note, however, that other standards such as ISO-2022-JP may impose extra conditions such as the current character set is reset to US-ASCII before the end of a line.\n"
),
p({},
"To represent large character sets, ISO/IEC 2022 builds on ",
a({href: "/wiki/ISO/IEC_646", title: "ISO/IEC 646"}, "ISO/IEC 646"),
"'s property that one seven bit character will normally define 94 graphic (printable) characters (in addition to space and 33 control characters). Using two bytes, it is thus possible to represent up to 8836 (94\u00d794) characters; and, using three bytes, up to 830584 (94\u00d794\u00d794) characters. Though the standard defines it, no registered character set uses three bytes (although ",
a({href: "/wiki/Extended_Unix_Code#EUC-TW", title: "Extended Unix Code"}, "EUC-TW"),
"'s unregistered G2 is). For the two-byte character sets, the code point of each character is normally specified in so-called ",
i({}, "kuten"),
" ",
"(Japanese: ",
span({lang: "ja", title: "Japanese language text"}, "\u533a\u70b9"),
") form (sometimes called ",
i({}, "q\u016bw\u00e8i"),
" ",
"(Chinese: ",
span({lang: "zh-CN", title: "Chinese language text"}, "\u533a\u4f4d"),
"), especially when dealing with ",
a({"class": "mw-redirect", href: "/wiki/GB2312", title: "GB2312"}, "GB2312"),
" ",
"and related standards), which specifies a zone (",
span({lang: "ja", title: "Japanese language text"}, "\u533a"),
", Japanese: ",
i({}, "ku"),
", Chinese: ",
i({}, "q\u016b"),
"), and the point (Japanese: ",
span({lang: "ja", title: "Japanese language text"}, "\u70b9"),
" ",
i({}, "ten"),
") or position (Chinese: ",
span({lang: "zh-CN", title: "Chinese language text"}, "\u4f4d"),
" ",
i({}, "w\u00e8i"),
") of that character within the zone.\n"
),
p({}, "The escape sequences therefore do not only declare which character set is being used, but also, by knowing the properties of these character sets, know whether a 94-, 96-, 8836-, or 830584-character (or some other sized) encoding is being dealt with.\n"),
p({},
"In practice, the escape sequences declaring the national character sets may be absent if context or convention dictates that a certain national character set is to be used. For example, ISO-8859-1 states that no defining escape sequence is needed and ",
a({"class": "external mw-magiclink-rfc", href: "https://tools.ietf.org/html/rfc1922", rel: "nofollow"}, "RFC 1922"),
", which defines ISO-2022-CN, allows ISO-2022 SHIFT characters to be used without explicit use of escape sequences.\n"
),
p({},
"The ISO-2022 definitions of the ISO-8859-X character sets are specific fixed combinations of the components that form ISO-2022. Specifically the lower control characters (C0) the US-ASCII character set (in GL) and the upper control characters (C1) are standard and the high characters (GR) are defined for each of the ISO-8859-X variants; for example ISO-8859-1 is defined",
sup({"class": "noprint Inline-Template Template-Fact", style: "white-space:nowrap;"},
"[",
i({},
a({href: "/wiki/Wikipedia:Citation_needed", title: "Wikipedia:Citation needed"},
span({title: "This claim needs references to reliable sources. (October 2013)"}, "citation needed")
)
),
"]"
),
" ",
"by the combination of ISO-IR-1, ISO-IR-6, ISO-IR-77 and ISO-IR-100 with no shifts or character changes allowed.\n"
),
p({},
"Although ISO/IEC 2022 character sets using control sequences are still in common use, particularly ISO-2022-JP, most modern ",
a({"class": "mw-redirect", href: "/wiki/E-mail", title: "E-mail"}, "e-mail"),
" ",
"applications are converting to use the simpler ",
a({href: "/wiki/Unicode", title: "Unicode"}, "Unicode"),
" ",
"transforms such as ",
a({href: "/wiki/UTF-8", title: "UTF-8"}, "UTF-8"),
". The encodings that don't use control sequences, such as the ISO-8859 sets are still very common.\n"
),
"\n",
h2({},
span({"class": "mw-headline", id: "Code_structure"}, "Code structure"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=2", title: "Edit section: Code structure"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
h3({},
span({"class": "mw-headline", id: "Notation_and_nomenclature"}, "Notation and nomenclature"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=3", title: "Edit section: Notation and nomenclature"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
p({},
"ISO/IEC 2022 coding specifies a two-layer mapping between character codes and displayed characters. ",
a({href: "/wiki/Escape_sequence", title: "Escape sequence"}, "Escape sequences"),
" ",
"allow any of a large registry of graphic character sets to be \"designated\"",
sup({"class": "reference", id: "cite_ref-2"},
a({href: "#cite_note-2"},
"[",
"2",
"]"
)
),
" ",
"into one of four working sets, named G0 through G3, and shorter control sequences specify the working set that is \"invoked\"",
sup({"class": "reference", id: "cite_ref-3"},
a({href: "#cite_note-3"},
"[",
"3",
"]"
)
),
" ",
"to interpret bytes in the stream.\n"
),
p({},
"Encoding byte values (\"bit combinations\") are often given in ",
a({href: "/wiki/JIS_X_0208#Single_byte_codes", title: "JIS X 0208"}, "column-line notation"),
", where two decimal numbers in the range 00\u201315 (each corresponding to a single hexadecimal digit) are separated by a slash.",
sup({"class": "reference", id: "cite_ref-4"},
a({href: "#cite_note-4"},
"[",
"4",
"]"
)
),
" ",
"Hence also, codes 0x20 through 0x2F inclusive may be referred to as \"column 02\". This is the notation used in the ISO/IEC 2022 / ECMA-35 standard itself.",
sup({"class": "reference", id: "cite_ref-5"},
a({href: "#cite_note-5"},
"[",
"5",
"]"
)
),
" ",
"They may be described elsewhere using ",
a({href: "/wiki/Hexadecimal", title: "Hexadecimal"}, "hexadecimal"),
", as is often used in this article, or using the corresponding ASCII characters,",
sup({"class": "reference", id: "cite_ref-6"},
a({href: "#cite_note-6"},
"[",
"6",
"]"
)
),
" ",
"although the escape sequences are actually defined in terms of byte values, and the graphic assigned to that byte value may be altered without affecting the control sequence.\n"
),
p({},
"Byte values from the 7-bit ASCII graphic range (hexadecimal 0x20\u20130x7F), being on the left side of a character code table, are referred to as \"GL\" codes ",
i({}, "(with \"GL\" standing for \"graphics left\")"),
" ",
"while bytes from the \"high ASCII\" range (0xA0\u20130xFF), if available (i.e. in an 8-bit environment), are referred to as the \"GR\" codes ",
i({}, "(\"graphics right\")"),
".",
sup({"class": "reference", id: "cite_ref-8.1_7-0"},
a({href: "#cite_note-8.1-7"},
"[",
"7",
"]"
)
),
" ",
"The terms \"CL\" and \"CR\" are defined for the control ranges, but the CL range always invokes the primary (C0) controls, whereas the CR range always either invokes the secondary (C1) controls or is unused.",
sup({"class": "reference", id: "cite_ref-8.1_7-1"},
a({href: "#cite_note-8.1-7"},
"[",
"7",
"]"
)
),
"\n"
),
"\n",
h3({},
span({"class": "mw-headline", id: "Fixed_coded_characters"}, "Fixed coded characters"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=4", title: "Edit section: Fixed coded characters"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
p({},
"The ",
a({href: "/wiki/Delete_character", title: "Delete character"}, "delete character"),
" ",
"DEL (0x7F), the ",
a({href: "/wiki/Escape_character", title: "Escape character"}, "escape character"),
" ",
"ESC (0x1B) and the ",
a({"class": "mw-redirect", href: "/wiki/Space_character", title: "Space character"}, "space character"),
" ",
"SP (0x20) are designated \"fixed\" coded characters",
sup({"class": "reference", id: "cite_ref-8"},
a({href: "#cite_note-8"},
"[",
"8",
"]"
)
),
" ",
"and are always available when G0 is invoked over GL, irrespective of what character sets are designated. They may not be included in graphical character sets, although other sizes or types of ",
a({href: "/wiki/Whitespace_character", title: "Whitespace character"}, "whitespace character"),
" ",
"may be.",
sup({"class": "reference", id: "cite_ref-9"},
a({href: "#cite_note-9"},
"[",
"9",
"]"
)
),
"\n"
),
"\n",
h3({},
span({"class": "mw-headline", id: "Graphical_character_sets"}, "Graphical character sets"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=5", title: "Edit section: Graphical character sets"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
p({},
"Each of the four working sets G0 through G3 may be a 94-character set or a 94",
sup({}, "n"),
"-character ",
a({"class": "mw-redirect", href: "/wiki/Multi_Byte_Character_Set", title: "Multi Byte Character Set"}, "multi-byte set"),
". Additionally, G1 through G3 may be a 96- or 96",
sup({}, "n"),
"-character set.\n"
),
p({},
"In a 96- or 96",
sup({}, "n"),
"-character set, the bytes 0x20 through 0x7F (or 0xA0 through 0xFF) are used. In a 94- or 94",
sup({}, "n"),
"-character set, the bytes 0x20 and 0x7F are not used.",
sup({"class": "reference", id: "cite_ref-10"},
a({href: "#cite_note-10"},
"[",
"10",
"]"
)
),
" ",
"When a 96- or 96",
sup({}, "n"),
"-character set is invoked in the GL region, the space and delete characters (codes 0x20 and 0x7F) are not available until a 94- or 94",
sup({}, "n"),
"-character set (such as the G0 set) is invoked in GL.",
sup({"class": "reference", id: "cite_ref-8.1_7-2"},
a({href: "#cite_note-8.1-7"},
"[",
"7",
"]"
)
),
"\n"
),
"\n",
h3({},
span({"class": "mw-headline", id: "Combining_characters"}, "Combining characters"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=6", title: "Edit section: Combining characters"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
p({},
"Characters are expected to be spacing characters, not combining characters, unless specified otherwise by the graphical set in question.",
sup({"class": "reference", id: "cite_ref-6.3.3_11-0"},
a({href: "#cite_note-6.3.3-11"},
"[",
"11",
"]"
)
),
" ",
"ISO 2022 / ECMA-35 also recognises the use of the ",
a({href: "/wiki/C0_and_C1_control_codes#BS", title: "C0 and C1 control codes"}, "backspace"),
" ",
"and carriage return control characters as means of combining otherwise spacing characters, as well as the ",
a({href: "/wiki/ANSI_escape_code#CSI_sequences", title: "ANSI escape code"}, "CSI sequence"),
" ",
"\"Graphic Character Combination\" (GCC)",
sup({"class": "reference", id: "cite_ref-6.3.3_11-1"},
a({href: "#cite_note-6.3.3-11"},
"[",
"11",
"]"
)
),
" ",
"(",
code({}, "CSI 0x20 (SP) 0x5F (_)"),
").",
sup({"class": "reference", id: "cite_ref-12"},
a({href: "#cite_note-12"},
"[",
"12",
"]"
)
),
"\n"
),
p({},
"Use of the backspace and carriage return in this manner is permitted by ",
a({href: "/wiki/ISO/IEC_646", title: "ISO/IEC 646"}, "ISO/IEC 646"),
" ",
"but prohibited by ",
a({"class": "mw-redirect", href: "/wiki/ISO/IEC_4873", title: "ISO/IEC 4873"}, "ISO/IEC 4873"),
" ",
"/ ECMA-43",
sup({"class": "reference", id: "cite_ref-ECMA-43_13-0"},
a({href: "#cite_note-ECMA-43-13"},
"[",
"13",
"]"
)
),
" ",
"and by ",
a({href: "/wiki/ISO/IEC_8859", title: "ISO/IEC 8859"}, "ISO/IEC 8859"),
",",
sup({"class": "reference", id: "cite_ref-FDIS-8859-10_14-0"},
a({href: "#cite_note-FDIS-8859-10-14"},
"[",
"14",
"]"
)
),
sup({"class": "reference", id: "cite_ref-ECMA-144_15-0"},
a({href: "#cite_note-ECMA-144-15"},
"[",
"15",
"]"
)
),
" ",
"on the basis that it leaves the graphical character repertoire undefined.",
sup({"class": "reference", id: "cite_ref-ECMA-43_13-1"},
a({href: "#cite_note-ECMA-43-13"},
"[",
"13",
"]"
)
),
" ",
"ISO/IEC 4873 / ECMA-43 does, however, permit the use of the GCC function on the basis that the sequence of characters is kept the same and merely displayed in one space, rather than being over-stamped to form a character with a different meaning.",
sup({"class": "reference", id: "cite_ref-ECMA-43_13-2"},
a({href: "#cite_note-ECMA-43-13"},
"[",
"13",
"]"
)
),
"\n"
),
"\n",
h3({},
span({"class": "mw-headline", id: "Control_character_sets"}, "Control character sets"),
span({"class": "mw-editsection"},
span({"class": "mw-editsection-bracket"}, "["),
a({href: "/w/index.php?title=ISO/IEC_2022&action=edit§ion=7", title: "Edit section: Control character sets"}, "edit"),
span({"class": "mw-editsection-bracket"}, "]")
)
),
"\n",
p({},
"Control character sets are classified as \"primary\" or \"secondary\" control character sets,",
sup({"class": "reference", id: "cite_ref-6.4.1_16-0"},
a({href: "#cite_note-6.4.1-16"},
"[",
"16",
"]"
)
),
" ",
"respectively also called \"C0\" and \"C1\" control character sets.",
sup({"class": "reference", id: "cite_ref-6.4.4_17-0"},
a({href: "#cite_note-6.4.4-17"},
"[",
"17",
"]"
)
),
"\n"
),
p({},
"A C0 control set must contain the ESC (escape) control character at 0x1B,",
sup({"class": "reference", id: "cite_ref-6.4.2_18-0"},
a({href: "#cite_note-6.4.2-18"},
"[",
"18",
"]"
)
),
" ",
"whereas a C1 control set may not contain the escape control whatsoever.",
sup({"class": "reference", id: "cite_ref-6.4.3_19-0"},
a({href: "#cite_note-6.4.3-19"},
"[",
"19",
"]"
)
),
" ",
"Hence, they are entirely separate registrations, with a C0 set being only a C0 set and a C1 set being only a C1 set.",
sup({"class": "reference", id: "cite_ref-6.4.4_17-1"},
a({href: "#cite_note-6.4.4-17"},
"[",
"17",
"]"
)
),
" ",
"If codes from the C0 set of ISO 6429 / ECMA-48, i.e. the ",
a({href: "/wiki/C0_and_C1_control_codes#C0_controls", title: "C0 and C1 control codes"}, "ASCII control codes"),
", appear in the C0 set, they are required to appear at their ISO 6429 / ECMA-48 locations.",
sup({"class": "reference", id: "cite_ref-6.4.2_18-1"},
a({href: "#cite_note-6.4.2-18"},
"[",
"18",
"]"
)
),
" ",
"Inclusion of transmission control characters in the C0 set, besides the ten included by ISO 6429 / ECMA-48, or inclusion of any of those ten in the C1 set, is also prohibited by the ISO/IEC 2022 / ECMA-35 standard.",
sup({"class": "reference", id: "cite_ref-6.4.2_18-2"},
a({href: "#cite_note-6.4.2-18"},
"[",
"18",
"]"
)
),
sup({"class": "reference", id: "cite_ref-6.4.3_19-1"},
a({href: "#cite_note-6.4.3-19"},
"[",
"19",
"]"
)
),
"\n"