[ic] vlink display of UTF8 characters
peter at pajamian.dhs.org
Mon Aug 15 22:28:08 UTC 2016
On 16/08/16 00:07, Peter wrote:
> We recently found we were having issues with the display of UTF8
> characters (I honestly don't know why this issue is coming up now, this
> shop has been live for years). At any rate, the problem, after hours
> spent debugging, turned out to be coming from the vlink script.
> I switched over to vlink.pl and the problem persists, but I was able to
> "fix" vlink.pl with the following patch:
> socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!\n";
> +binmode(SOCK, ':utf8');
> ... note that the fix is to simply specify utf8 handling of the socket
> stream. Now this is not a fix that I'm willing to push out because it
> would likely break backwards compatibility. We really need a way to
> make this a configurable setting.
Further testing shows that this breaks binary file uploads. I am
testing how it works to move the binmode line to after get_entity().
I think that reading the HTTP headers for the charset and setting the
binmode accordingly may be the ultimate solution here to make sure that
it doesn't clash with file downloads either.
More information about the interchange-users