detox icon indicating copy to clipboard operation
detox copied to clipboard

unsupported unicode length

Open josh-aliencode opened this issue 2 years ago • 4 comments

When I run the command: detox -rv * on my files.. many of them don't get renamed, and outputs error: unsupported unicode length I assume the obvious, that this is because the character length is too much. Is there any way to force this or bypass it? Or even display the conflicting file?

josh-aliencode avatar Oct 14 '23 18:10 josh-aliencode

What version of detox are you using? You can get it quickly by running:

detox -V

dharple avatar Mar 31 '24 14:03 dharple

Actually, it's possible that the filenames aren't in UTF-8 at all. You can try detox -n -s iso8859_1 FILE or, if you're using detox 2, detox -n -s iso8859_1-legacy FILE, to see if either yields better results.

dharple avatar Mar 31 '24 15:03 dharple

I figured out the reason was because there was an apostrophe in some names.. will that particular detox command fix that without having to manually rename?

josh-aliencode avatar Mar 31 '24 15:03 josh-aliencode

It really depends on what the underlying bytes of the apostrophe are. If it's just a normal apostrophe, it shouldn't cause the error you're seeing. If it's a CP-1252 or upper ISO-8859-n apostrophe, then you might get the error you were describing.

The detox -n ... commands above will do a dry run, so you can see what would happen without it actually changing anything.

One other option to help solve this is to use hexdump -C to see what the actual bytes are.

dharple avatar Mar 31 '24 19:03 dharple