New SqueakMap
Yoshiki Ohshima
yoshiki at squeakland.org
Wed Apr 12 22:16:32 UTC 2006
G.ANvran,
> I would like to hear more about the different ways the #converter
> instvar is set - which I commented on in... this post:
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-April/102526.html
* It would make more sense if setting converter to nil means
"no-conversion". (Don't know what it means for WideStrings,
though.)
* If you need non conversion and fast operation, we could work
around it with some optimization.
* The internal representation is Unicode-based, and the first 256 chars
almost happen to match iso-8859-1.
* The default for text I thought to be is UTF-8. That is why #reset
and half of #open:forWrite: use it. The unfortunate logic in
#open:forWrite: is obsolete; as "open a file as code" now has its own
logic to tell the file encoding by looking at the magic number of
the file. (Sorry again, Andreas.)
* The logic is, I wanted to see the following works:
| str |
str := 'Some Japanese Text'. "such as '$B$3$s$K$A$O(B'"
(FileStream newFileNamed: 'foo.txt') nextPutAll: str; close.
(FileStream readOnlyFileNamed: 'foo.txt') contentsOfEntire = str. "=> true"
* And also the resulting foo.txt is meaningful text file.
Ned's old suggestion, which to have #readOnlyBinaryFileNamed:,
#newBinaryFileNamed:, etc. make a lot of sense.
-- Yoshiki
More information about the Squeak-dev
mailing list
|