* [PATCH 1/5] view: note we assume UTF-8 on unknown encodings
2020-04-04 8:03 4% [PATCH 0/5] view*: minor cleanups and fixes Eric Wong
@ 2020-04-04 8:03 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-04 8:03 UTC (permalink / raw)
To: meta
Clarify that we're assuming the text is UTF-8, since users
may have no idea how it's mangled.
---
lib/PublicInbox/View.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 70c10604..d897aeec 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -518,7 +518,9 @@ sub attach_link ($$$$;$) {
my $rv = $ctx->{obuf};
$$rv .= qq($nl<a\nhref="$ctx->{mhref}$idx-$sfn">);
if ($err) {
- $$rv .= "[-- Warning: decoded text below may be mangled --]\n";
+ $$rv .= <<EOF;
+[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
+EOF
}
$$rv .= "[-- Attachment #$idx: ";
my $ts = "Type: $ct, Size: $size bytes";
^ permalink raw reply related [relevance 7%]
* [PATCH 0/5] view*: minor cleanups and fixes
@ 2020-04-04 8:03 4% Eric Wong
2020-04-04 8:03 7% ` [PATCH 1/5] view: note we assume UTF-8 on unknown encodings Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-04 8:03 UTC (permalink / raw)
To: meta
Just a few odds and ends which bother me when reading
the code or render HTML result.
Eric Wong (5):
view: note we assume UTF-8 on unknown encodings
view: use defined-or operator to simplify checks
view: dedupe_subject: allow "0" is a valid Subject
viewdiff: reduce sub parameter count
view: inline flush_quote sub
lib/PublicInbox/View.pm | 37 +++++++++++++++----------------------
lib/PublicInbox/ViewDiff.pm | 21 ++++++++++++---------
2 files changed, 27 insertions(+), 31 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-04 8:03 4% [PATCH 0/5] view*: minor cleanups and fixes Eric Wong
2020-04-04 8:03 7% ` [PATCH 1/5] view: note we assume UTF-8 on unknown encodings Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).