iconv: Add UTF-7-IMAP variant in utf-7.c
commit9df157b4ed52108495de9f8bc77ef922034e3b66
authorMax Gautier <mg@max.gautier.name>
Mon, 21 Mar 2022 12:25:05 +0000 (21 09:25 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 21 Mar 2022 16:23:57 +0000 (21 13:23 -0300)
tree5854a8896b112f8cc138357380ae98b2b295203c
parentef7b963280f0b110e589cbe29cdf31d88fb171f0
iconv: Add UTF-7-IMAP variant in utf-7.c

UTF-7-IMAP differs from UTF-7 in the followings ways (see RFC 3501[1]
for reference) :

- The shift character is '&' instead of '+'
- There is no "optional direct characters" and the "direct characters"
  set is different
- There is no implicit shift back to US-ASCII from BASE64, all BASE64
  sequences MUST be terminated with '-'

[1]: https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3

Signed-off-by: Max Gautier <mg@max.gautier.name>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
iconvdata/TESTS
iconvdata/gconv-modules
iconvdata/testdata/UTF-7-IMAP [new file with mode: 0644]
iconvdata/testdata/UTF-7-IMAP..UTF8 [new file with mode: 0644]
iconvdata/utf-7.c