equal
deleted
inserted
replaced
1 "{ Encoding: utf8 }" |
|
2 |
|
3 "{ Package: 'stx:libbasic' }" |
1 "{ Package: 'stx:libbasic' }" |
4 |
2 |
5 "{ NameSpace: CharacterEncoderImplementations }" |
3 "{ NameSpace: CharacterEncoderImplementations }" |
6 |
4 |
7 TwoByteEncoder subclass:#ISO10646_to_UTF8 |
5 TwoByteEncoder subclass:#ISO10646_to_UTF8 |
284 anyAbove7BitAscii := false. |
282 anyAbove7BitAscii := false. |
285 s := (String uninitializedNew:aUnicodeString size) writeStream. |
283 s := (String uninitializedNew:aUnicodeString size) writeStream. |
286 aUnicodeString do:[:eachCharacter | |
284 aUnicodeString do:[:eachCharacter | |
287 |codePoint b1 b2 b3 b4 b5 v "{Class: SmallInteger }"| |
285 |codePoint b1 b2 b3 b4 b5 v "{Class: SmallInteger }"| |
288 |
286 |
289 codePoint := eachCharacter asciiValue. |
287 codePoint := eachCharacter codePoint. |
290 codePoint <= 16r7F ifTrue:[ |
288 codePoint <= 16r7F ifTrue:[ |
291 s nextPut:eachCharacter. |
289 s nextPut:eachCharacter. |
292 ] ifFalse:[ |
290 ] ifFalse:[ |
293 anyAbove7BitAscii := true. |
291 anyAbove7BitAscii := true. |
294 b1 := Character value:((codePoint bitAnd:16r3F) bitOr:2r10000000). |
292 b1 := Character value:((codePoint bitAnd:16r3F) bitOr:2r10000000). |
353 ! ! |
351 ! ! |
354 |
352 |
355 !ISO10646_to_UTF8 class methodsFor:'documentation'! |
353 !ISO10646_to_UTF8 class methodsFor:'documentation'! |
356 |
354 |
357 version |
355 version |
358 ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8.st,v 1.1 2004-03-05 17:18:03 cg Exp $' |
356 ^ '$Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__ISO10646_to_UTF8.st,v 1.2 2004-03-05 21:57:28 stefan Exp $' |
359 ! ! |
357 ! ! |