Skip to content

Commit 2a86fd2

Browse files
committed
Prevent test failures caused by encoding issues
Temporarily use UTF-8 to parse stylesheets instead of system encoding until encoding detection is implemented. Use ASCII characters in resource file names DEVSIX-1446 Autoported commit. Original commit hash: [5674405e]
1 parent de4b565 commit 2a86fd2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

itext/itext.html2pdf/itext/html2pdf/css/parse/CssStyleSheetParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public static CssStyleSheet Parse(Stream stream, String baseUrl) {
104104
}
105105
}
106106
CssParserStateController controller = new CssParserStateController(baseUrl);
107-
TextReader br = PortUtil.WrapInBufferedReader(new StreamReader(stream));
108-
// TODO define charset
107+
TextReader br = PortUtil.WrapInBufferedReader(new StreamReader(stream, Encoding.UTF8));
108+
// TODO determine charset correctly DEVSIX-1458
109109
char[] buffer = new char[8192];
110110
int length;
111111
while ((length = br.Read(buffer, 0, buffer.Length)) > 0) {

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5c50c645b3e9ae22f1bfcf49effd04264a2b2a02
1+
5674405eb5eb958a42b178023059a0b2d91875e4

0 commit comments

Comments
 (0)