Charset Plugins
- Create a file in
radare2/libr/util/d/yourfile.sdb.txt. The extension .sdb.txt is important. - Edit the file
radare2/libr/util/charset.c. -addextern SdbGperf gperf_latin_1_ISO_8859_1_western_european;. -then add your variable&gperf_latin_1_ISO_8859_1_western_european,instatic const SdbGperf *gperfs[] - Update the Makefile:
radare2/libr/util/Makefile: -AddOBJS+=d/latin_1_ISO_8859_1_western_european.o - Update the Makefile
radare2/libr/util/d/Makefileto add your file name with not .sdb and not .txt inFILES=latin_1_ISO_8859_1_western_european - Update the unit tests of
radare2/test/db/cmd/charset
Congratulation! You can now type the command:
e cfg.charset=latin_1_ISO_8859_1_western_european;
If you have any issue with this tutorial you can check out the example at https://github.com/radareorg/radare2/pull/19627/files.