DERB(1)

πŸ’… DERB(1) β€” the ICU 78.3 manual, but make it make sense

okay bestie, welcome to derb β€” she's a disassembler for compiled resource bundles, and she's lowkey iconic. this is your girl's manual page, rewritten so you actually want to read it. πŸŽ€


✨ NAME ✨

derb β€” disassemble a resource bundle. that's it. that's the job. she takes the compiled lil binary bundle and turns it back into readable text. reverse engineering but make it cute πŸ¦‹


🌸 SYNOPSIS 🌸

derb [ -h, -?, --help ] [ -V, --version ] [ -v, --verbose ] [ -e,
--encoding encoding ] [ --bom ] [ -t, --truncate [ size ] ] [ -s,
--sourcedir source ] [ -d, --destdir destination ] [ -i, --icudatadir
directory ] [ -c, --to-stdout ] bundle ...

she takes a whole list of bundle ... files at the end, no cap. πŸ’…


πŸ’– DESCRIPTION πŸ’–

so here's the vibe: derb reads the compiled resource bundle files you pass on the command line and writes them back in text form. the resulting text files get a .txt extension, while compiled resource bundle source files typically have a .res extension. so like, .res goes in, .txt comes out. glow up. ✨

it's customary to name the resource bundles by their locale name, i.e. to use a local identifier for the bundle filename β€” for example ja_JP.res for Japanese (Japan) data, or root.res for the root bundle. and bestie, this is especially important for derb, because the locale name is not accessible directly from the compiled resource bundle, so you need to know which locale to ask for when opening the bundle. derb will produce a file whose base name is the base name of the compiled resource file itself. but! if you use the --to-stdout, -c option, the text gets written on the standard output instead. main character behaviour, honestly. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -h, -?, --help β€” print help about usage and exit. your lil "what do i even do here" button. 🫢
  • -V, --version β€” print the version of derb and exit. she'll tell you who she is. πŸ’
  • -v, --verbose β€” display extra informative messages during execution. she gets chatty. not me loving that. 😭
  • -A, --suppressAliases β€” don't follow aliases when producing output. leave them aliases alone fr fr.
  • -e, --encoding encoding β€” set the encoding used to write output files to encoding. the default encoding is the invariant (subset of ASCII or EBCDIC) codepage for the system (see the INVARIANT CHARACTERS section below, bestie). the choice of the encoding does not affect the data, just their representation. characters that cannot be represented in the encoding will be represented using \uhhhh escape sequences. so like, nothing gets lost, it just gets... dressed differently. πŸ’…
  • --bom β€” write a byte order mark (BOM) at the beginning of the file. ⚠️ see the CAVEATS section, this one has a whole situation.
  • -l, --locale locale β€” set the locale for the resource bundle, which is used both in the generated text and as the base name of the output file. double duty queen. πŸ‘‘
  • -t, --truncate [ size ] β€” truncate individual resources (strings or binary data) to size bytes. the default if size is not specified is 80 bytes. short and sweet, kinda like her patience for long strings. πŸ“
  • -s, --sourcedir source β€” set the source directory to source. the default source directory is the current directory. and here's the tea: if - is passed for source, then the bundle will be looked for in its default location, specified by the ICU_DATA environment variable (or defaulting to the location set when ICU was built if ICU_DATA is not set). slay. ✨
  • -d, --destdir destination β€” set the destination directory to destination. the default destination directory is specified by the environment variable ICU_DATA, or is the location set when ICU was built if ICU_DATA is not set. πŸ’œ
  • -i, --icudatadir directory β€” look for any necessary ICU data files in directory. for example, when processing collation overrides, the file ucadata.dat must be located. the default ICU data directory is specified by the environment variable ICU_DATA. she's looking for her stuff, let her find it. πŸ™ˆ
  • -c, --to-stdout β€” write the disassembled bundle on standard output instead of into a file. no files were harmed in the making of this output. 🌈

⚠️ CAVEATS ⚠️

when the option --bom is used, the character U+FEFF is written in the destination encoding regardless of whether it is a Unicode transformation format (UTF) or not. this option should only be used with an UTF encoding, as byte order marks are not meaningful for other encodings.

so like... don't do it with a non-UTF encoding. she said what she said. πŸ’€


🧚 INVARIANT CHARACTERS 🧚

the invariant character set consists of the following set of characters, expressed as a standard POSIX regular expression:

[a-z]|[A-Z]|[0-9]|_|
|+|-|*|/

this is the set which is guaranteed to be available regardless of code page. the ride-or-dies. the ones who show up no matter what. 🫢


🌿 ENVIRONMENT 🌿

  • ICU_DATA β€” specifies the directory containing ICU data. defaults to ${prefix}/share/icu/78.3/. some tools in ICU depend on the presence of the trailing slash. it is thus important to make sure that it is present if ICU_DATA is set. the trailing slash MATTERS, bestie, do not skip it. 😭

πŸ‘‘ AUTHORS πŸ‘‘

  • Vladimir Weinstein
  • Yves Arrouye

the legends themselves. periodt. πŸ’…


⭐ VERSION ⭐

1.0


Copyright (C) 2002 IBM, Inc. and others.


πŸ¦‹ SEE ALSO πŸ¦‹

(that's her sibling, the one going the other direction. iykyk.)


and that's the whole page, bestie. this one shipped as part of the ICU MANPAGE, dated 7 Mar 2014 β€” ICU 78.3 energy, vintage date, still serving. go disassemble something and text me how it goes. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from