Mantis - Squeak
Viewing Issue Advanced Details
7602 Multilingual major always 01-29-11 23:30 05-22-11 20:35
unoduetre  
leves  
normal  
resolved 4.1  
fixed  
none    
none trunk  
0007602: CR and LF
Please run the following code:
file:=FileStream fileNamed: 'test.txt'.
file lineEndConvention: #lf.
file nextPut: Character cr.
file nextPutAll:'
' asWideString.
file lineEndConvention: #cr.
file nextPut: Character cr.
file nextPutAll:'
' asWideString
I've tested it on Linux (#lf convention), but it might work on other systems (that's why I've included the last four lines). The file 'test.txt' after doing these lines is: nl cr cr cr, and of course it should be nl nl cr cr.

Notes
(0014036)
leves   
01-30-11 04:07   
This bug was introduced in 4.1 by the speedup of TextConverters (latin1Map and friends). The only solution I can imagine is to move all line end conversion related code to the TextConverters (at least for writing). This may also give us a small performance boost.
(0014037)
unoduetre   
01-30-11 12:58   
I suppose whole MultiByteFileStream should get some refactoring. In a week I have more time to do something with it. Now I've simply applied some dirty patch.
(0014117)
leves   
05-22-11 20:35   
Fixed by Multilingual-ul.144...151 and Files-ul.110.