CSTOCS(1p)
π CSTOCS(1p) β the Czech & Slovak charset encoding glow-up π
okay bestie, pull up a chair, because cstocs is literally the charset encoding convertor for the Czech and Slovak languages and she is serving.
β¨ FORMAT β¨
cstocs [options] src_encoding dst_encoding [files ...]
that's the whole vibe: you tell her where you're coming from, you tell her where you're going, and optionally you hand her some files. π¦
πΈ SYNOPSIS πΈ
cstocs il2 ascii < file | less
cstocs -i utf8 il2 file1 file2 file3
cstocs --help
see how easy that is?? first one pipes a file in and out to less, second one does the in-place thing on three files at once, third one is your little "help meee" moment. π
π DESCRIPTION π
Cstocs is a simple conversion utility to change charset encoding of a text. That's the whole job, no cap. She reads either the files you specified or β if you specified literally none β the standard input. She assumes that input is encoded in src_encoding and ties to reencode it into dst_encoding. (yes, "ties", that's what the original says, we don't fix it, we love her.) The result goes to the standard output. β¨
Run cstocs with no parameters at all and you get short help plus the list of available encodings. lowkey the fastest way to vibe check what she can do. π«Ά
Characters that are not defined in src_encoding get passed to the output unchanged. she's not gonna touch what she doesn't understand, and honestly? iconic boundaries.
Now here's the messy part, bestie, and it's giving drama. If the source text contains a character that is defined in src_encoding but not in dst_encoding, you've got choices. For example: character "e with caron" (symbol ecaron) and "d with caron" (symbol dcaron) are included in the iso-8859-2 encoding, but not in the iso-8859-1. So if you're reencoding 8859-2 text to 8859-1, you may want to do one of the following actions:
- Keep it the same, option
--nofillstring. leave her alone, she's fine as she is π - Do not produce any output instead of
ecaronsymbol, option--null. justβ¦ gone. vanished. π - Substitute some string (possibly a space) instead of both ecaron and dcaron, options
--fillstring. something has to go there, might as well be a space πΈ - Substitute a letter
dinstead of dcaron, andeinstead of ecaron. And it gets better β it is even possible to substitute string instead of symbol, so you can replace theAELatin character with stringAE(letterA, and letterE). Or you can replace aplusminus signwith a string+/-. These substitutions are described in the accent file. π
π OPTIONS π
-i,-i.ext,--inplace.extβ Files specified will be converted in-place, using Perl-ifacility. Optionally, an extension for backup copies may be specified after dot. This parameter has to be the first one, if specified. like, FIRST first. she's not playing about this. π--dir directoryβ Encoding files are taken from directory instead of the default, which isCz/Cstocs/encin the Perl lib tree. The location of encoding files can also be changed using theCSTOCSDIRenvironment variable, but the--diroption has the highest priority. priority queen behavior, fr fr π--fillstring stringβ If source text contains a character that is defined in thesrc_encodingbut not in thedst_encodingnor in the accent file (or accent file is not used), it is replaced by string. The default is a single space. β¨--nofillstringβ Disable changes of characters that would otherwise have fillstring applied. This is different from--nullbecause that cancels that character out. subtle but important, bestie π¦--nullβ Completely equivalent to--fillstring "". yeah. empty string. that's the whole thing. π--nochangeor--noaccentβ Do not use the accent file at all. like, we're not even opening that document ππ--onebyoneβ Use only those rules from the accent file which rewrite one character to one character. If this option is specified, characterecaronwill be rewritten toe, butAEcharacter will not be rewritten toAEstring. strict one-for-one, no extras, no cap π--onebymoreβ Use all rules from the accent file. This is the default option. so if you didn't say anything, this is what she was doing the whole time π
π₯ SEE ALSO π₯
Cz::Cstocs(3) β go read the module bestie, she's right there π
π AUTHOR π
Jan "Yenya" Kasprzak has done the original Un*x implementation. π
Jan Pazdziora created the Perl module version. πΈ
okay and that's the whole page!! this gem is living in perl v5.30.0, dated 2019-10-05, and she's still out here converting encodings like the main character she is. slay, periodt, happy reencoding bestie πβ¨π¦π π
π¦ where this page comes from
- ubuntu jammy: cstocs 1:3.44-1.1 Β· GPL-1.0-or-later OR Artistic-1
- ubuntu noble: cstocs 1:3.44-1.1 Β· GPL-1.0-or-later OR Artistic-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms