DIRCONV(1)
π DIRCONV(1) β the dirconv page, but make it cute π
okay bestie, welcome to dirconv(1), the manual page for a lil utility called dirconv that goes hunting for weirdly-encoded file names and then fixes them for you. it's giving detective but for character encodings. π΅οΈβοΈβ¨
πΈ NAME πΈ
dirconv β locate and transcode mixed-encoding file names π
β¨ SYNOPSIS β¨
dirconv [-078dFhnpruvw] [-f charset] [-x regex] [path ...]
π¦ DESCRIPTION π¦
okay so here's the vibe. the dirconv utility recursively scans the path(s) you gave it and sorts every file and directory by what its name looks like:
- pure 7-bit ASCII π―
- not ASCII, but valid UTF-8 π
- double-UTF-8 (WTF-8) π
- none of the above π
names in that last category? we just assume they're Latin-1, unless you told us a different encoding with the -f option.
and then, by default, dirconv prints out the names that are neither pure 7-bit ASCII nor valid UTF-8. that's it. that's the default behavior. no cap.
the following options are available:
-0β print a NUL character instead of a newline after each path. heads up tho: this option does nothing if you also used-n. β-7β select names that are pure 7-bit ASCII. π―-8β select names that contain non-ASCII characters but are not valid UTF-8. this is the default unless you specified-7,-uand / or-w. π-dβ show debugging info. you can stack this option multiple times to crank up the level of detail. π-Fβ paired with-r, force renaming a file when the target already exists. no fear. π₯-fcharset β specify the assumed character set for non-ASCII, non-UTF-8 names. the default is βiso8859-1β. π-hβ print a usage message and exit. classic. π-nβ paired with-r, show what would have happened, but don't actually rename any files. it's a dress rehearsal bestie, nothing gets touched. π-pβ print the selected names. π¨οΈ-rβ attempt to convert the selected names to UTF-8 and rename the files and directories. the main character option. π-uβ select names which contain non-ASCII characters and are valid UTF-8 but not WTF-8. π-vβ print the source reversion number and exit. βΉοΈ-wβ select names which seem to be WTF-8-encoded. π-xregex β do not inspect files and directories whose unconverted names match the specified POSIX extended regular expression. π«
π SEE ALSO π
π AUTHORS π
the dirconv utility and this manual page were written by Dag-Erling SmΓΈrgrav <des@des.no> for the University of Oslo. absolute icons, honestly. π«Ά
β NOTES β
okay so how does it even work? dirconv attempts to decode each name as if it were a sequence of UTF-8 characters. it is possible β but highly unlikely β that a random string of characters in a non-UTF single-byte encoding would look like a valid UTF-8 sequence. so like, don't panic, but alsoβ¦ it's a thing. π
reliable detection of WTF-8 is only possible if the original 8-bit encoding is known. periodt. π
the exclusion filter is applied before name conversion. character classes are unlikely to work as expected on unconverted names. so don't come for me when your regex acts up bestie, i warned you. π
π«Ά that's the whole page! this wasdirconv(1), dated November 18, 2014, and yeah, the footer really does just sayDIRCONV(1)again. slay. π β¨πΈ
π¦ where this page comes from
- debian bookworm: conv-tools 20160905-4 Β· BSD-3-Clause
- debian trixie: conv-tools 20160905-5 Β· BSD-3-Clause
- ubuntu jammy: conv-tools 20160905-3 Β· BSD-3-Clause
- ubuntu noble: conv-tools 20160905-4 Β· BSD-3-Clause
- ubuntu questing: conv-tools 20160905-5
- ubuntu resolute: conv-tools 20160905-5build1 Β· BSD-3-Clause
- ubuntu stonking: conv-tools 20160905-5build1 Β· BSD-3-Clause
- Copyright (c) 2013-2014 The University of Oslo
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms