DETOX.TBL(5)
π DETOX.TBL π
okay bestie, welcome to the detox.tbl page, straight out of the File Formats Manual section of your local man pages π this is the whole vibe on how you tune the translation tables for detox(1) β the little tables that tell detox how to read your characters. let's get into it π¦
β¨ NAME β¨
detox.tbl β translation table for detox(1) π
πΈ OVERVIEW πΈ
so detox lets you configure how the safe, ISO-8859-1, and UTF-8 (aka Unicode) filters do their thing π and the way you do that is through these text-based translation tables β they're literally just text files that let you tune how these character sets get interpreted. no cap, that's the whole concept β¨
π SYNTAX π
the format is genuinely so simple it's giving main character energy. there are exactly two levels: one for meta data, and one for the actual translations π
default _β this sets the default translation for a character. here's the important part tho: if the default is empty or non-existent, that means any unknown character should fall through to the next filter π and that's how you can chain multiple translation tables together in a sequence, one after another. iconic, honestly.startβ marks the start of a value list inside the translation table β¨start langβ marks the start of a language specific value list inside the translation table π¦endβ marks the end of a value list inside the translation table π«Άvalue translationβ thevaluecan be written in decimal (1), hex (0x01), or octal (01). same rules that apply tosscanfapply here, fr fr. andtranslationcan be a string or a quoted string, with either single or double quotes π
π EXAMPLES π
okay so here's a lil peek at part of a safe table, with only a few character replacements specified π
#
# This is a simple example of a "safe" table. It only translates 4 characters.
#
# The default is commented out, so any character that is not in this table will
# be ignored.
#
# default _
#
# This is the main replacement block. Each line specifies a character and a
# string to replace it with.
#
start
0x09 _tab_ # comments work on lines, too
0x24 _dollar_ # $$$
0x26 _and_ # ampersand
end
#
# Starts an optional, language-specific translation block. detox will read
# your locale and load the block if the word after start matches the language
# portion of your locale.
#
# In the example here, the character $ will be replaced with "_money_" if the
# user is working in English. If the user is using a different language, $
# will be replaced with the value configured in the previous block, "_dollar_".
#
start en
0x24 _money_ # money money
end
# EOF
and then you could enable this table in your ~/.detoxrc, hanging out with your other filters π
# Sample detoxrc
sequence default {
safe {
filename "/home/MYUSERNAME/.local/share/detox/safe.tbl";
};
safe;
wipeup;
};
# EOF
so when detox runs, it'll run the custom safe filter first, then the default safe filter, and then finally the wipeup filter π₯ head over to detoxrc(5) for more deets on all the various filter types, iykyk β¨
π SEE ALSO π
π AUTHORS π
detox was written by Doug Harple. periodt π
okay that's the whole page bestie, you ate that π«Ά this came to you from Debian, dated February 24, 2021 β go forth and translate your characters, mwah πβ¨π
π¦ where this page comes from
- arch rolling: detox 3.0.1-1 Β· BSD-3-Clause
- fedora 43: detox 3.0.1-1.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: detox 3.0.1-3.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: detox 3.0.1
- nixpkgs unstable: detox 3.0.1
- ubuntu stonking: detox 3.0.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms