enca icon indicating copy to clipboard operation
enca copied to clipboard

How should I add the new encoding to lib/lang_??.c

Open 2i3r opened this issue 6 years ago • 1 comments

I'm trying to add some Arabic and Farsi encoding such as CP1256 and ISO 8859-6 to the enca. I'm in the half way following DEVELOP.md. I've added empty arabic language just how it instructed. Now I'm adding CP1256, but on the line

  • lib/lang_??.c:
    • Add new encoding to some existing language(s)

How should I add the new encoding to lib/lang_ar.c I've created? I don't see any similar code in other lib/lang_??.c files. From what I understood from the source code, it seems all encoding names would be added to a language by compiling data folder c codes and running a doit.sh with encoding names from data/new_language folder, which itself runs a sequence of binary and Perl codes to generate new_language.h and probably some ??.base and rawcounts.??s in the folder. is it right?!

How it should be done exactly?! do I need to compile with --enable-maintainer-mode to complete this steps? Do you think DEVELOP.md needs a patch?

2i3r avatar Sep 17 '19 10:09 2i3r

https://github.com/nijel/enca/pull/87 add how to add new language.