Adding Additional --charset Option

Werner Koch wk@gnupg.org
Tue Jan 7 22:00:02 2003


On Tue, 7 Jan 2003 13:17:27 -0500, Weddell, R J (Rob) said:

> We are attempting to port gnupg to the IBM mainframe platform which
> uses EBCDIC encoding as it's native character set.

There used to be partial support for EBCIDC in GnuPG (e.g. a
table to define what characters make up a word), but this was dropped
some time ago when GNU/Linux was ported to run on VS.

However there are more things to take into account, for example you
will find isascii() tests at some places and the code _might_ now
assume to run on an ascii system.  That said, it won't be sufficient
to add just a new character conversion to get a full interoperable
application.  OTOH, GnuPG is written as a POSIX program and should be
portable to all POSIX platforms; it is just that non-ascii systems are
not on very desktop or server nowadays ;-)

> If so, has anyone had experience in adding additional character set
> options who would be willing to give advice as to what code needs
> modification?

You need to change util/strgutil.c, utf8_to_native and native_to_utf8,
the current implementation assumes ascii in the low 7 bits.  If you
need help please feel free to ask me at wk@g10code.com.


Shalom-Salam,

   Werner