Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text encoding issues with default settings #6407

Closed
scabug opened this issue Sep 19, 2012 · 7 comments · Fixed by scala/scala#10004
Closed

Text encoding issues with default settings #6407

scabug opened this issue Sep 19, 2012 · 7 comments · Fixed by scala/scala#10004
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Sep 19, 2012

While in a perfect world “Unicode/UTF-8 everywhere” would be a sensible standard, Scala has to work well with existing code.

Because of that, text encoding/input/output is done in Unicode where possible and in the underlying platform's encoding where necessary (due to Java's heritage).

Despite that, there are several places in the standard library where a third way has been chosen: Defaulting to some outdated encodings of the ISO-8859-X family.

This should be fixed.

@scabug
Copy link
Author

scabug commented Sep 19, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6407?orig=1
Reporter: @soc
Affected Versions: 2.10.0, 2.11.0-M1

@scabug
Copy link
Author

scabug commented Sep 19, 2012

@soc said:
scala/scala#1359

@SethTisue
Copy link
Member

SethTisue commented Apr 19, 2022

For the record: it appears to me that the bug part of this already got fixed at some point, and scala/scala#10004 is just code cleanup (with one esoteric exception in writeChromeTrace, where an encoding wasn't specified).

@som-snytt
Copy link

The PR links to the fix on xml.

I did not deprecate this arguable default on the grounds that Source is known to be caveat emptorish.

https://github.com/scala/scala/blob/2.13.x/src/library/scala/io/Source.scala#L119

@SethTisue
Copy link
Member

@som-snytt
Copy link

Too bad April is almost over. At the beginning of the month, they ought to have announced the deprecation of Scala 2 in its entirety. Deprecation messages would continue to be emitted in Scala 3 under -source:migration-3.0.

@SethTisue
Copy link
Member

Honestly I think fixing io.Source would be fair game, even in a point release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants