[ic] vlink display of UTF8 characters

Peter peter at pajamian.dhs.org
Mon Aug 15 12:07:14 UTC 2016


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:

--- a/vlink.pl	2010-08-20 17:29:56.000000000 -0700
+++ b/vlink.pl	2016-08-15 03:54:37.000000000 -0700
@@ -141,6 +141,7 @@
 eval { alarm $LINK_TIMEOUT; };

 socket(SOCK, PF_UNIX, SOCK_STREAM, 0)	or die "socket: $!\n";
+binmode(SOCK, ':utf8');

 my $ok;


... 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.

This should also be fixed in the vlink.c and tlink.c scripts, but I
honestly have no idea how to enable UTF8 handling of a socket in C.  I
would like to switch my client back to vlink.c, though, due to it being
more efficient.

Comments, ideas, better fixes?


Peter




More information about the interchange-users mailing list