[OpenIndiana-discuss] Cannot open: Illegal byte sequence with a file containing a question mark
James Carlson
carlsonj at workingcode.com
Thu Apr 26 14:11:50 UTC 2012
Flo wrote:
> On a Linux Machine, the file looks like this;
> Adig?zel-Huda.jpg (a black rhombus with a question mark in it)
That's how untranslatable characters are typically displayed.
> When I extract that tar file on my openindiana 148b machine, I get the
> following error:
> Adig\374zel-Huda.jpg: Cannot open: Illegal byte sequence
That error is EILSEQ, and it means that the file name has an illegal
UTF8 sequence in it, and that the file system you're trying to write to
uses only UTF8 for file names. See the open(2) man page for details.
Since this is ZFS, check the "utf8only" property. Something like this
may work for you:
zfs get utf8only `df -k . | awk 'NR==2 { print $1 }'`
If that shows that the property is set "on", then that's what's causing
the failure. Sadly, it's configurable only when creating a file system,
so if you wanted to change it, you'd have to create a new file system
and copy everything over.
There's probably some magic that will tell tar to do character set
translation from whatever national character set that might be into
UTF8. If it were my file, I'd use pax with -o invalid=bypass or -o
invalid=rename to fix it up.
Or it's possible that you just need to tell tar not to do national
character set conversions that it might already be doing. Set
"LANG=at.UTF-8" in your environment and try unpacking that way. (See
"locale -a" for viable settings.)
--
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the OpenIndiana-discuss
mailing list