Skip to content

Conversation

flybyray
Copy link
Contributor

@flybyray flybyray commented Jul 3, 2017

#1075 testing

ok it works only with java.nio.Files https://stackoverflow.com/a/21987929

The Problem in the test is the Ü Character in the filename.
On Windows for example the utf-8 string will translate to Ü when accessing the file system.

INFORMATION: cp1252: C:\dev\src\github.com\playframework\play1\framework\test-classes\play\libs\Anhang Performance-Bericht_ Übersicht §18 Bundesbank gesetz Meldepflichten.PDF
Jul 04, 2017 5:03:31 AM play.Logger info
INFORMATION: cp1252: C:\dev\src\github.com\playframework\play1\framework\test-classes\play\libs\Anhang Performance-Bericht_ Übersicht §18 Bundesbank gesetz Meldepflichten.PDF

But if you list the files with java and print it out it will be Ü.

        Path path1 = target.listFiles()[1].toPath().toAbsolutePath();
        String anotherString2 = path1.toString();
        cp1252 = new String(anotherString2.getBytes("UTF-8"), "WINDOWS-1252");

@flybyray flybyray force-pushed the add-test-for-io branch 2 times, most recently from d34c072 to 3888934 Compare July 4, 2017 00:32
@flybyray
Copy link
Contributor Author

flybyray commented Jul 4, 2017

The best way would be to fix legacy code in the play framework https://play.lighthouseapp.com/projects/57987-play-framework/tickets/2132-replace-legacy-file-io-code

@flybyray flybyray closed this Jul 4, 2017
@flybyray flybyray deleted the add-test-for-io branch July 4, 2017 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants