netsurf: pass encoding to the parser

This commit is contained in:
Pierre Tachoire
2024-01-12 11:58:49 +01:00
parent 1a03412635
commit 028cd2331f
5 changed files with 9 additions and 7 deletions

View File

@@ -21,7 +21,7 @@ pub fn run(arena: *std.heap.ArenaAllocator, comptime dir: []const u8, f: []const
const file = try std.fs.cwd().openFile(f, .{});
defer file.close();
const html_doc = try parser.documentHTMLParse(file.reader());
const html_doc = try parser.documentHTMLParse(file.reader(), "UTF-8");
const doc = parser.documentHTMLToDocument(html_doc);
const dirname = fspath.dirname(f[dir.len..]) orelse unreachable;