[squeak-dev] The Trunk: Multilingual-ar.46.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Multilingual-ar.46.mcz

commits-2
Andreas Raab uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ar.46.mcz

==================== Summary ====================

Name: Multilingual-ar.46
Author: ar
Time: 30 August 2009, 9:48:57 am
UUID: 4b20790d-9f81-c147-a216-fdc17a377a14
Ancestors: Multilingual-ar.45

The last commit included a change to ShiftJISConverter that didn't show in the diff and seems to be just a truncated method version. Very, very odd. For now just revert the method.

=============== Diff against Multilingual-ar.45 ===============

Item was added:
+ ----- Method: ShiftJISTextConverter>>nextPut:toStream: (in category 'conversion') -----
+ nextPut: aCharacter toStream: aStream
+ | value leadingChar aChar |
+ aStream isBinary ifTrue: [^aCharacter storeBinaryOn: aStream].
+ aCharacter isTraditionalDomestic ifTrue: [
+ aChar := aCharacter.
+ value := aCharacter charCode.
+ ] ifFalse: [
+ value := aCharacter charCode.
+ (16rFF61 <= value and: [value <= 16rFF9F]) ifTrue: [
+ aStream basicNextPut: (self sjisKatakanaFor: value).
+ ^ aStream
+ ].
+ aChar := JISX0208 charFromUnicode: value.
+ aChar ifNil: [^ aStream].
+ value := aChar charCode.
+ ].
+ leadin!

Item was changed:
  ----- Method: ShiftJISTextConverter>>nextFromStream: (in category 'conversion') -----
  nextFromStream: aStream
  | character1 character2 value1 value2 char1Value result |
  aStream isBinary ifTrue: [^ aStream basicNext].
  character1 := aStream basicNext.
  character1 isNil ifTrue: [^ nil].
  char1Value := character1 asciiValue.
  (char1Value < 16r81) ifTrue: [^ character1].
  (char1Value > 16rA0 and: [char1Value < 16rE0]) ifTrue: [^ self katakanaValue: char1Value].
 
  character2 := aStream basicNext.
  character2 = nil ifTrue: [^ nil "self errorMalformedInput"].
  value1 := character1 asciiValue.
  character1 asciiValue >= 224 ifTrue: [value1 := value1 - 64].
  value1 := value1 - 129 bitShift: 1.
  value2 := character2 asciiValue.
  character2 asciiValue >= 128 ifTrue: [value2 := value2 - 1].
  character2 asciiValue >= 158 ifTrue: [
  value1 := value1 + 1.
  value2 := value2 - 158
  ] ifFalse: [value2 := value2 - 64].
  result := Character leadingChar: self leadingChar code: value1 * 94 + value2.
+ ^ self toUnicode: result
+ !
- ^ self toUnicode: !