Message11857
I was playing with the jdk9+ issues on a separate branch.
If you go to https://github.com/ohumbel/jython/tree/jdk9 and scroll down to the README you can find a table of the different encoding determination methods on some platforms.
To summarize:
- the discouraged internal encoding() method only has an effect on windows
- there it returns the 'old' DOS code pages
- on all other platforms, file.encoding equals to defaultCharset()
So my conclusion was to use file.encoding on non windows, and a subprocess 'cmd /c chcp' on windows.
A possible implementation can be found in this commit: https://github.com/ohumbel/jython/commit/8fdf2c762aa054b7525eaaaf853b4e6a7bd69134
If this sounds reasonable, I would be happy to distill this into a new issue2659 branch and create a pull request. |
|
Date |
User |
Action |
Args |
2018-03-27 21:24:55 | otmarhumbel | set | messageid: <1522185895.34.0.467229070634.issue2659@psf.upfronthosting.co.za> |
2018-03-27 21:24:55 | otmarhumbel | set | recipients:
+ otmarhumbel, amak, jeff.allen |
2018-03-27 21:24:55 | otmarhumbel | link | issue2659 messages |
2018-03-27 21:24:54 | otmarhumbel | create | |
|