ppi-ag / deep-sampler

DeepSampler is a stubbing framework for compound tests
https://ppi.de
MIT License
11 stars 2 forks source link

JsonRecorder missing charset in OutputStreamWriter, JsonLoader uses hardcoded UTF8 #107

Closed skrilagg closed 2 years ago

skrilagg commented 2 years ago

Hi,

just came across an issue with charset/encoding of recorded data:

https://github.com/ppi-ag/deep-sampler/blob/5dee01ca03add7f50f68d2be4a069e2cb4baa9dc/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonLoader.java#L36

reads the files with UTF8 but in https://github.com/ppi-ag/deep-sampler/blob/5dee01ca03add7f50f68d2be4a069e2cb4baa9dc/deepsampler-persistence-json/src/main/java/de/ppi/deepsampler/persistence/json/JsonRecorder.java#L53 no charset is configured in the OutputStreamWriter.

We use Cp1252 most of the time and when loading the data from the json file, it's corrupted then. Maybe I'm missing a configuration that I can adjust.

Regards, Michel

JanSchankin commented 2 years ago

Hi Michel,

version 2.0.1 will come with the following changes:

Greetings Jan