[squeak-dev] The Trunk: Multilingual-mt.268.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 10 09:43:45 UTC 2022
Marcel Taeumel uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-mt.268.mcz
==================== Summary ====================
Name: Multilingual-mt.268
Author: mt
Time: 10 March 2022, 10:43:43.715713 am
UUID: fa723821-437e-3842-9b4a-408ea1ac7c96
Ancestors: Multilingual-mt.267
Fixes the dropped #leadingChar for RussianEnvironment, which happened when I integrated KOI8-R into the ByteTextConverter hierarchy.
Also updates mac-cyrillic but preserves the old version (includiont the mac-ukranian variation).
Note that #leadingChar and LanguageEnvironment are not sufficient to tag languages here at decoding time. For example, the MacCyrillicTextConverter covers Russian, Bulgarian, Belarusian, Macedonian, Serbian.
=============== Diff against Multilingual-mt.267 ===============
Item was added:
+ ----- Method: ByteTextConverter class>>applyLanguageInformation: (in category 'class initialization') -----
+ applyLanguageInformation: aLanguage
+ "Set language information in the decodeTable. Note that you should only do this after filling the encodeTable to not spoil its keys. See #encode:. See other implementations of #applyLanguageInformation:."
+
+ | l |
+ l := aLanguage leadingChar.
+ l = 0 ifTrue: [^ self "Ignore"].
+ decodeTable := decodeTable collect: [:codePoint |
+ (codePoint ~= -1 and: [codePoint ~= 16rFFFD])
+ ifTrue: [ (Character leadingChar: l code: codePoint) asInteger ]
+ ifFalse: [ codePoint "See #decode:" ]].!
Item was changed:
----- Method: ByteTextConverter class>>initializeTables (in category 'class initialization') -----
initializeTables
self == ByteTextConverter ifTrue: [ ^self ].
self
initializeDecodeTable;
initializeEncodeTable;
+ initializeLatin1MapAndEncodings;
+ applyLanguageInformation: self language
- initializeLatin1MapAndEncodings
!
Item was added:
+ ----- Method: ByteTextConverter class>>language (in category 'accessing') -----
+ language
+
+ ^ Unicode !
Item was added:
+ ----- Method: CP1253TextConverter class>>language (in category 'utilities') -----
+ language
+
+ ^ GreekEnvironment!
Item was added:
+ ----- Method: ISO88597TextConverter class>>language (in category 'utilities') -----
+ language
+
+ ^ GreekEnvironment!
Item was added:
+ ----- Method: KOI8TextConverter class>>language (in category 'utilities') -----
+ language
+
+ ^ RussianEnvironment!
Item was added:
+ MacCyrillicTextConverter subclass: #MacCyrillicOldTextConverter
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Multilingual-TextConversion'!
+
+ !MacCyrillicOldTextConverter commentStamp: 'mt 3/10/2022 10:28' prior: 0!
+ Encoding for mac-cyrillic before Mac OS 9.0.!
Item was added:
+ ----- Method: MacCyrillicOldTextConverter class>>encodingNames (in category 'utilities') -----
+ encodingNames
+ "Pre Mac OS 9.0 version of mac-cyrillic encoding. Should not be used anymore."
+
+ ^ #('mac-cyrillic-old')!
Item was added:
+ ----- Method: MacCyrillicOldTextConverter class>>initializeDecodeTable (in category 'class initialization') -----
+ initializeDecodeTable
+
+ super initializeDecodeTable.
+ decodeTable at: 16rA2 + 1 put: 16r00A2.
+ decodeTable at: 16rB6 + 1 put: 16r2202.
+ decodeTable at: 16rFF + 1 put: 16r00A4.!
Item was changed:
----- Method: MacCyrillicTextConverter class>>initializeDecodeTable (in category 'class initialization') -----
initializeDecodeTable
super initializeDecodeTable.
decodeTable := self createTableFrom: ((decodeTable copyFrom: 1 to: 128) , #(
16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417
16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F
16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427
16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F
+ 16r2020 16r00B0 16r0490 16r00A3 16r00A7 16r2022 16r00B6 16r0406
- 16r2020 16r00B0 16r00A2 16r00A3 16r00A7 16r2022 16r00B6 16r0406
16r00AE 16r00A9 16r2122 16r0402 16r0452 16r2260 16r0403 16r0453
+ 16r221E 16r00B1 16r2264 16r2265 16r0456 16r00B5 16r0491 16r0408
- 16r221E 16r00B1 16r2264 16r2265 16r0456 16r00B5 16r2202 16r0408
16r0404 16r0454 16r0407 16r0457 16r0409 16r0459 16r040A 16r045A
16r0458 16r0405 16r00AC 16r221A 16r0192 16r2248 16r2206 16r00AB
16r00BB 16r2026 16r00A0 16r040B 16r045B 16r040C 16r045C 16r0455
16r2013 16r2014 16r201C 16r201D 16r2018 16r2019 16r00F7 16r201E
16r040E 16r045E 16r040F 16r045F 16r2116 16r0401 16r0451 16r044F
16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437
16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F
16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447
+ 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r20AC)).!
- 16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r00A4)).!
Item was added:
+ ----- Method: MacCyrillicTextConverter class>>language (in category 'utilities') -----
+ language
+ "Well, actually, this encoding covers Russian, Bulgarian, Belarusian, Macedonian, Serbian."
+
+ ^ RussianEnvironment!
Item was added:
+ ----- Method: MacGreekTextConverter class>>language (in category 'utilities') -----
+ language
+
+ ^ GreekEnvironment!
Item was added:
+ MacCyrillicTextConverter subclass: #MacUkrainianTextConverter
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Multilingual-TextConversion'!
+
+ !MacUkrainianTextConverter commentStamp: 'mt 3/10/2022 10:29' prior: 0!
+ Encoding for mac-ukrainian before Mac OS 9.0.!
Item was added:
+ ----- Method: MacUkrainianTextConverter class>>encodingNames (in category 'as yet unclassified') -----
+ encodingNames
+
+ ^ #('macukrainian' 'mac-ukrainian') copy!
Item was added:
+ ----- Method: MacUkrainianTextConverter class>>initializeDecodeTable (in category 'as yet unclassified') -----
+ initializeDecodeTable
+
+ super initializeDecodeTable.
+ decodeTable at: 16rA2 + 1 put: 16r0490.
+ decodeTable at: 16rB6 + 1 put: 16r0491.
+ decodeTable at: 16rFF + 1 put: 16r00A4.!
Item was changed:
+ (PackageInfo named: 'Multilingual') postscript: 'ByteTextConverter withAllSubclassesDo: [:ea | ea initializeTables].'!
- (PackageInfo named: 'Multilingual') postscript: 'EUCTextConverter withAllSubclassesDo: [:ea | ea initializeTables].'!
More information about the Squeak-dev
mailing list
|