On Thursday 29 July 2004 2:14 pm, Yoshiki Ohshima wrote:
Again, the default assumption is that the String will hold text -- even though there's nothing in it yet! It seems to me that the default converter for this stream should be the Latin1TextConverter. If a particular user of a String has a need for or knowledge of a particular encoding, they can change the converter.
No. If the default is Latin1TextConverter, there would be more problems.
Like what? If everyone who wants text is specifying the type (like you suggest below) there shouldn't be any problems.
However, I don't think it's right to introduce new and incompatible character conversion semantics on the existing file API.
The rule of thumb is that if you open a file, you should think about it is text or binary, and if it is text, you should think about how it is interpreted.
Sure. And the authors of the code that was broken had done that when they wrote it.