Skip to content

Commit 151a4e6

Browse files
committed
lib: ensure feed_w3m always returns UTF-8
1 parent 7310c4d commit 151a4e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rfbl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ int feed_w3m(const void *inbuf, size_t len, const char *cset,
525525
fp.reset();
526526
int fout = -1;
527527
auto cl2 = HX::make_scope_exit([&]() { if (fout != -1) close(fout); });
528-
const char *const argv[] = {"w3m", "-dump", filename.c_str(), nullptr};
528+
const char *const argv[] = {"w3m", "-O", "UTF-8", "-dump", filename.c_str(), nullptr};
529529
auto pid = popenfd(argv, nullptr, &fout, nullptr, const_cast<const char *const *>(environ));
530530
if (pid < 0)
531531
return -1;

0 commit comments

Comments
 (0)