GENRB(1)
π genrb β bestie's guide to compiling resource bundles π
okay so welcome to the ICU 78.3 Manual page for genrb(1), and honestly? she's iconic. let's get into it π«Ά
β¨ NAME β¨
genrb β compile a resource bundle. that's it. that's the whole vibe. πΈ
π SYNOPSIS π
genrb [ -h, -?, --help ] [ -V, --version ] [ -v, --verbose ] [ -e,
--encoding encoding ] [ -j, --write-java [ encoding ] ] [ -s,
--sourcedir source ] [ -d, --destdir destination ] [ -i, --icudatadir
directory ] bundle ...
she takes a bunch of bundle files and does her little magic on them β¨
π¦ DESCRIPTION π¦
so what does genrb actually DO? she takes the resource bundle source files you pass on the command line and converts them into their binary form, or into a Java source file for use with ICU4J. no cap.
the resulting binary files have a .res extension, while resource bundle source files typically have a .txt extension. Java source files have a java extension and follow the ICU4J naming conventions. periodt. π
it's customary (read: the move, the slay) to name resource bundles by their locale name β like, use a local identifier for the bundle filename. e.g. ja_JP.txt for Japanese (Japan) data, or root.txt for the root bundle. but bestie, listen: in any case, genrb will produce a file whose base name is the name of the locale found in the resource file, not the base name of the resource file itself. it's giving "I do what I want with the filename" and honestly? respect. π
the binary files can be read directly by ICU, or used by pkgdata(1) for incorporation into a larger archive or library. teamwork makes the dream work fr fr. π€
π OPTIONS π
-h,-?,--helpβ print help about usage and exit. the "what do I do here" button π₯Ί-V,--versionβ print the version ofgenrband exit. she's telling you her age (78.3, obviously) π-v,--verboseβ display extra informative messages during execution. she's yapping and we love that for her π£οΈ-e,--encodingencoding β set the encoding used to read input files to encoding. the default encoding is the invariant (subset of ASCII or EBCDIC) codepage for the system (see section INVARIANT CHARACTERS). the encodingsUTF-8,UTF-16BE, andUTF-16LEare automatically detected if a byte order mark (BOM) is present. detective mode activated πβ¨-j,--write-java[ encoding ] β generate a Java source code for use with ICU4J. an optional encoding for the Java file can be given. java girlies rise up β-s,--sourcedirsource β set the source directory to source. the default source directory is specified by the environment variableICU_DATA, or the location set when ICU was built ifICU_DATAis not set. π-d,--destdirdestination β set the destination directory to destination. the default destination directory is specified by the environment variableICU_DATAor is the location set when ICU was built ifICU_DATAis not set. π¦-i,--icudatadirdirectory β look for any necessary ICU data files in directory. for example, when processing collation overrides, the fileucadata.datmust be located. the default ICU data directory is specified by the environment variableICU_DATA. π
π 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. no cap, these ones will never ghost you π
π 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 ifICU_DATAis set.
β οΈ bestie please keep that trailing slash. the tools lowkey depend on it. don't say I didn't warn you π
β VERSION β
78.3
π COPYRIGHT π
Copyright (C) 2000-2002 IBM, Inc. and others.
π SEE ALSO π
and that's the whole page!! π written under the ICU MANPAGE banner, dated 16 April 2002, for GENRB(1) β and yes she's still serving in ICU 78.3. slay, stay hydrated, and always check your trailing slash π
β¨π¦
π¦ where this page comes from
- arch rolling: icu 78.3-1 Β· LicenseRef-Unicode-3.0 AND BSD-2-Clause AND BSD-3-Clause AND NAIST-2003
- ubuntu stonking: icu-devtools 78.3-2ubuntu1 Β· MIT
- Copyright (C) 2016 and later: Unicode, Inc. and others
- Copyright (C) 2000-2002 IBM, Inc. and others
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms