Skip to content

Conversation

@AudricV
Copy link
Member

@AudricV AudricV commented Jun 3, 2021

On Windows, mocks are recorded and read with the Cp1252 encoding so it breaks the mocks for non ASCII characters on Linux OS (and so the CI).
The project is in Java 8, so we can't use FileReader(File, Charset) and FileReader(File, Charset) because these constructors require Java 11. Instead of changing the Java version of the extractor, use OutputStreamWriter and FileOutputStream objets instead of FileWriter objects and use InputStreamReader and FileInputStream objects instead of FileReader objects.

Fixes #643.

@AudricV AudricV added the bug Issue is related to a bug label Jun 3, 2021
@AudricV AudricV requested a review from XiangRongLin June 3, 2021 16:34
@AudricV AudricV force-pushed the utf-8-encoding-for-mocks-windows branch from fcea50a to ac31f3a Compare June 3, 2021 16:37
On Windows, mocks are recorded and read with the Cp1252 encoding so it breaks the mocks on non ASCII characters for Linux OS (and so the CI).
The project is in Java 8, so we can't use FileReader(File, Charset) and FileReader(File, Charset) because these methods require Java 11. Instead of changing the Java version of the extractor, use OutputStreamWriter and FileOutputStream instead of FileWriter and InputStreamReader and FileInputStream instead of FileReader.
@XiangRongLin XiangRongLin merged commit db81384 into TeamNewPipe:dev Jun 3, 2021
@AudricV AudricV deleted the utf-8-encoding-for-mocks-windows branch June 3, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify UTF-8 file encoding in RecordingDownloader and MockDownloader

2 participants