unaccent(1)
π unaccent(1) β bestie, it's the General Commands Manual energy
okay so you found unaccent and honestly? iconic tool. it removes accents from a stream or a string, and i'm about to tell you literally everything about it. no gatekeeping in this group chat π
β¨ NAME β¨
unaccent β remove accents from input stream or a string
like... that's the whole vibe. accents in, un-accented out. slay.
π SYNOPSIS π
unaccent [--debug_low] [--debug_high] [-h] charset [string] [expected]
that's it. that's the lineup. keep reading, i promise it makes sense π¦
πΈ DESCRIPTION πΈ
So here's how it goes, bestie, depending on how many args you hand it:
- With a single argument,
unaccentreads data fromstdin, swaps every accented letter for its unaccented equivalent, and writes the result onstdout. chill, right? - If the second argument (
string) is provided,unaccenttransforms it instead, replacing accented letters by their unaccented equivalent, and prints the result on the standard output. so no stdin involved, it's just doing the thing to your lil string. - The charset of the input string, or of the data you piped in from
stdin, is specified by thecharsetargument (ISO-8859-15for instance). and yes, the output is printed using the same charset. periodt. - If the
expectedargument is provided, the output string gets compared to it, and if they are not equalunaccentexits on error. it's giving "i checked your homework" π«Ά
ngl the machinery under the hood is kinda cute: unaccent relies on the iconv(3) library to convert from the specified charset to UTF-16BE (or UTF-16 if UTF-16BE is not available). so you should check the manual pages for available charsets. and on GNU/Linux, this command:
iconv -l
shows all available charsets. run it, scroll it, romanticize it β¨
π OPTIONS π
--debug_lowβ prints human readable information about the unaccentuation process. seeunac(3)for more information.--debug_highβ prints very detailed information about the unaccentuation process. seeunac(3)for more information. (yes, more detail than--debug_low. it's giving overachiever, and we love that.)--help,-hβ prints a short usage and exits.
π EXAMPLES π
example one: string goes in, accents come out
Remove accents from the string Γ©tΓ© and check that the result is ete.
unaccent ISO-8859-1 Γ©tΓ© ete
see how expected is doing its lil quality check? obsessed.
example two: file in, file out
Remove accents from file myfile and put the result in file myfile.unaccent
unaccent ISO-8859-1 < myfile > myfile.unaccent
redirection girlies rise up π
π₯ SEE ALSO π₯
go read those too, iykyk π
π§ AUTHOR π§
Loic Dachary loic@senga.org http://www.senga.org/unac/
reminder bestie: the expected check means a mismatch = error exit, so don't be surprised when it yells at you. it's not being mean, it's being correct π
and that's the whole page! this one's from the local source, version... local, and it lives in section unaccent(1). mwah, go un-accent something gorgeous ππ
π¦ where this page comes from
- debian bookworm: unaccent 1.8.0-10 Β· GPL-2.0-or-later
- debian trixie: unaccent 1.8.0-10+b3 Β· GPL-2.0-or-later
- ubuntu jammy: unaccent 1.8.0-10 Β· GPL-2.0-or-later
- ubuntu noble: unaccent 1.8.0-10 Β· GPL-2.0-or-later
- ubuntu questing: unaccent 1.8.0-10
- ubuntu resolute: unaccent 1.8.0-11 Β· GPL-2.0-or-later
- ubuntu stonking: unaccent 1.8.0-11 Β· GPL-2.0-or-later
- Copyright (C) 2000, 2001, 2002, 2003 Loic Dachary <loic@senga.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms