mskConvertFile: source from: sourceEncoding to: targetEncoding output: target
"
| encoding |
encoding :=
GsHostProcess mskCheckFileEncoding: '/home/mf/Schreibtisch/217055.csv'.
GsHostProcess
mskConvertFile: '/home/mf/Schreibtisch/217055.csv'
from: encoding
to: 'UTF-8'
output: '/home/mf/Schreibtisch/217055.utf8.csv'.
"
| output aWriteStream |
aWriteStream := WriteStream on: String new.
aWriteStream
nextPutAll: 'iconv -f' ;
space ;
nextPutAll: sourceEncoding ;
space ;
nextPutAll: '-t';
space ;
nextPutAll: targetEncoding ;
space ;
nextPut: $' ;
nextPutAll: source ;
nextPut: $' ;
space ;
nextPutAll: '-o';
space ;
nextPut: $' ;
nextPutAll: target ;
nextPut: $' .
output := System performOnServer: aWriteStream contents.
^output
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass