Open scabug opened 15 years ago
Imported From: https://issues.scala-lang.org/browse/SI-1581?orig=1 Reporter: @paulp
@odersky said: I am not sure what the status of this one is, and who's tracking it.
@paulp said: Replying to [comment:7 odersky]:
I am not sure what the status of this one is, and who's tracking it.
I'm still under the belief this is for me to figure out and document (mine by default, but nonetheless.) I just haven't been all that excited to come back to it, and I've also been holding out hope that the decision to inflict MacRoman on another generation of OSX scala users can be unmade.
@paulp said: Punting downstream.
It was reported on IRC that some simple scala source to read and output a file choked a few characters in. We discovered that although java and other languages correctly determine his locale and that ISO-8859 need be assumed, scala does not, and here is why:
Both the compiler and library default properties are seeded from files in the jars (compiler.properties and library.properties) which contain only copyright and version information. Thus the above code is not using UTF8 only when file.encoding is not set in the system properties; it is using UTF8 always.
This is true of some other properties as well, e.g.
Conversely, settings which do use system defaults are checking the system properties object directly.
As a note of caution, fixing this would change the default scala encoding on most platforms. On the mac the default file.encoding is MacRoman, and on windows I think it varies. Some additional logic to smooth all that out is probably appropriate, but what surely ought to be a bug is ignoring someone's intentionally set system settings and consequently failing to read their data, when java does the right thing.