BAEL-4753: pass encoding parameter to the getBytes() (#13677)

* BAEL-4753: pass encoding parameter to the getBytes()

* BAEL-4753: pass encoding parameter to the getBytes()
This commit is contained in:
ACHRAF TAITAI
2023-03-19 13:42:12 +01:00
committed by GitHub
parent a21ccc585f
commit 68efc86426
2 changed files with 4 additions and 3 deletions

View File

@@ -40,6 +40,6 @@ public class CharacterEncodingExamples {
charsetDecoder.onMalformedInput(codingErrorAction);
return new BufferedReader(
new InputStreamReader(
new ByteArrayInputStream(input.getBytes()), charsetDecoder)).readLine();
new ByteArrayInputStream(input.getBytes(charset)), charsetDecoder)).readLine();
}
}