[squeak-dev] The Trunk: Multilingual-nice.65.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 27 21:29:45 UTC 2009


Nicolas Cellier uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-nice.65.mcz

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

Name: Multilingual-nice.65
Author: nice
Time: 27 November 2009, 10:29:13 am
UUID: 5e7b3a9a-9718-4731-8e0c-a3f5515fd607
Ancestors: Multilingual-nice.64

http://bugs.squeak.org/view.php?id=6086
In the process of #detectLineEndConvention a primitive fails trying to obtain the position of '/dev/stdout'.

Re-Install fix from Kph compatible with latests changes.

=============== Diff against Multilingual-nice.64 ===============

Item was changed:
  Object subclass: #LanguageEnvironment
  	instanceVariableNames: 'id'
  	classVariableNames: 'ClipboardInterpreterClass Current FileNameConverterClass InputInterpreterClass KnownEnvironments SystemConverterClass'
  	poolDictionaries: ''
  	category: 'Multilingual-Languages'!
  
  !LanguageEnvironment commentStamp: 'bf 8/16/2009 16:52' prior: 0!
  The name multilingualized Squeak suggests that you can use multiple language at one time.  This is true, of course, but the system still how to manage the primary language; that provides the interpretation of data going out or coming in from outside world. It also provides how to render strings, as there rendering rule could be different in one language to another, even if the code points in a string is the same.
  
    Originally, LanguageEnvironment and its subclasses only has class side methods.  After merged with Diego's Babel work, it now has instance side methods.  Since this historical reason, the class side and instance side are not related well.
  
+   When we talk about the interface with the outside of the Squeak world, there are three different "channels"; the keyboard input, clipboard out   p   u   t       a   n   d       i   n   p   u   t   ,       a   n   d       f   i   l   e   n   a   m   e   .           O   n       a       n   o   t   -   t   o   -   u   n   c   o   m   m   o   n       s   y   s   t   e   m       s   u   c   h       a   s       a       U   n   i   x       s   y   s   t   e   m       l   o   c   a   l   i   z   e   d       t   o       J   a   p   a   n   ,       a   l   l       o   f       t   h   e   s   e       t   h   r   e   e       c   a   n       h   a   v   e       (   a   n   d       d   o   e   s       h   a   v   e   )       d   i   f   f   e   r   e   n   t       e   n   c   o   d   i   n   g   s   .           S   o       w   e       n   e   e   d       t   o       m   a   n   a   g   e       t   h   e   m       s   e   p   a   r   a   t   e   l   y   .           N   o   t   e       t   h   a   t       t   h   e       e   n   c   o   d   i   n   g       i   n       a       f   i   l   e       c   a   n       b   e       a   n   y   t   h   i   n   g   .           W   h   i   l   e       i   t       i   s       n   i   c   e       t   o       p   r   o   v   i   d   e       a       s   u   g   g   e   s   t   e   d       g   u   e   s   s       f   o   r       t   h   i   s       '   d   e   f   a   u   l   t       s   y   s   t   e   m       f   i   l   e       c   o   n   t   e   n   t       e   n   c   o   d   i   n   g   '   ,       i   t       i   s       n   o   t       c   r   i   t   i   c   a   l   .   
-   When we talk about the interface with the outside of the Squeak world, there are three different "channels"; the keyboard input, clipboard output and input, and filename.  On a not-to-uncommon system such as a Uni   x       s   y   s   t   e   m       l   o   c   a   l   i   z   e   d       t   o       J   a   p   a   n   ,       a   l   l       o   f       t   h   e   s   e       t   h   r   e   e       c   a   n       h   a   v   e       (   a   n   d       d   o   e   s       h   a   v   e   )       d   i   f   f   e   r   e   n   t       e   n   c   o   d   i   n   g   s   .           S   o       w   e       n   e   e   d       t   o       m   a   n   a   g   e       t   h   e   m       s   e   p   a   r   a   t   e   l   y   .           N   o   t   e       t   h   a   t       t   h   e       e   n   c   o   d   i   n   g       i   n       a       f   i   l   e       c   a   n       b   e       a   n   y   t   h   i   n   g   .           W   h   i   l   e       i   t       i   s       n   i   c   e       t   o       p   r   o   v   i   d   e       a       s   u   g   g   e   s   t   e   d       g   u   e   s   s       f   o   r       t   h   i   s       '   d   e   f   a   u   l   t       s   y   s   t   e   m       f   i   l   e       c   o   n   t   e   n   t       e   n   c   o   d   i   n   g   '   ,       i   t       i   s       n   o   t       c   r   i   t   i   c   a   l   .   
     
             R   e   n   d   e   r   i   n   g       s   u   p   p   o   r   t       i   s       l   i   m   i   t   e   d       b   a   s   i   c       L   -   t   o   -   R       r   e   n   d   e   r   i   n   g       s   o       f   a   r   .           B   u   t       y   o   u       c   a   n       p   r   o   v   i   d   e       d   i   f   f   e   r   e   n   t       l   i   n   e   -   w   r   a   p       r   u   l   e   ,       a   t       l   e   a   s   t   .   
     !

Item was changed:
+ ----- Method: MultiByteFileStream>>wantsLineEndConversion: (in category 'remnant') -----
- ----- Method: MultiByteFileStream>>wantsLineEndConversion: (in category 'accessing') -----
  wantsLineEndConversion: aBoolean
+ 	
+ 	wantsLineEndConversion :=  aBoolean.
  
+ 	lineEndConvention ifNil: [ self detectLineEndConvention ]. !
- 	wantsLineEndConversion := aBoolean.
- 	self detectLineEndConvention.!

Item was changed:
  ----- Method: MultiByteFileStream class>>guessDefaultLineEndConvention (in category 'class initialization') -----
  guessDefaultLineEndConvention
  	"Lets try to guess the line end convention from what we know about the
  	path name delimiter from FileDirectory."
  	FileDirectory pathNameDelimiter = $:
  		ifTrue: [^ self defaultToCR].
  	FileDirectory pathNameDelimiter = $/
+ 		ifTrue: [((SmalltalkImage current osVersion)
- 		ifTrue: [((SmalltalkImage current getSystemAttribute: 1002)
  					beginsWith: 'darwin')
  				ifTrue: [^ self defaultToCR]
  				ifFalse: [^ self defaultToLF]].
  	FileDirectory pathNameDelimiter = $\
  		ifTrue: [^ self defaultToCRLF].
  	"in case we don't know"
  	^ self defaultToCR!

Item was changed:
  ----- Method: MultiByteFileStream>>open:forWrite: (in category 'open/close') -----
  open: fileName forWrite: writeMode 
  	| result |
  	result := super open: fileName forWrite: writeMode.
  	result ifNotNil: [
+ 			converter ifNil: [self converter: UTF8TextConverter new].
+ 			lineEndConvention ifNil: [ self detectLineEndConvention ]
+ 	].
- 			converter ifNil: [converter := UTF8TextConverter new].
- 			self detectLineEndConvention].
  	^result!




More information about the Squeak-dev mailing list