Created attachment 161923 [details] [patch] don't hard code endianness Attached is a patch to detect endianness and use iconv with the right "from" encoding. Otherwise, you get something like the following if you're using the encoding with the wrong endianness: % utf8lookup d6 No LINES variable in environment so unable to determine lines per page. Using default of 24. iconv: (stdin):1:0: cannot convert That's because there's no valid unicode codepoint for 0xd6000000 (the wrong endian represenation of the U+00D6 codepoint). Also while here, change /usr/local replacement from LOCALBASE -> PREFIX (although the replacement is not used in the current version of the port). The utf8lookup patch was sent upstream recently - no response yet.
Committed, thanks! Also thanks for submitting your patch to upstream: please let me know about any answer.
A commit references this bug: Author: thierry Date: Sat Oct 24 16:48:49 UTC 2015 New revision: 400131 URL: https://svnweb.freebsd.org/changeset/ports/400131 Log: - Fix hard-coded endian assumption; - Change /usr/local replacement from LOCALBASE -> PREFIX. PR: ports/203706 Submitted by: John Hein <z7dr6ut7gs (at) snkmail.com> Changes: head/sysutils/uniutils/Makefile head/sysutils/uniutils/files/patch-utf8lookup