Rezin is a free and open-source utility that offers a set of commands for examining and extracting data from the resource fork of legacy MacOS files.
Rezin can fetch the resource fork from a number of different sources, including some which are functional even on systems which do not themselves support the resource fork.
The public interfaces of Rezin use UTF-8 encoding. Also, resource type codes will always be composed of four unicode characters, but as a consequence of UTF-8 encoding, may not always be four bytes.
Moreover, carriage returns will be converted to newlines in cases where text data is expected.