diff options
author | Max Gautier <mg@max.gautier.name> | 2022-03-21 09:25:05 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-21 13:23:57 -0300 |
commit | 9df157b4ed52108495de9f8bc77ef922034e3b66 (patch) | |
tree | 5854a8896b112f8cc138357380ae98b2b295203c /iconvdata/testdata/UTF-7-IMAP..UTF8 | |
parent | ef7b963280f0b110e589cbe29cdf31d88fb171f0 (diff) | |
download | glibc-9df157b4ed52108495de9f8bc77ef922034e3b66.tar.gz glibc-9df157b4ed52108495de9f8bc77ef922034e3b66.tar.xz glibc-9df157b4ed52108495de9f8bc77ef922034e3b66.zip |
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>
Diffstat (limited to 'iconvdata/testdata/UTF-7-IMAP..UTF8')
-rw-r--r-- | iconvdata/testdata/UTF-7-IMAP..UTF8 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/iconvdata/testdata/UTF-7-IMAP..UTF8 b/iconvdata/testdata/UTF-7-IMAP..UTF8 new file mode 100644 index 0000000000..8b9add3670 --- /dev/null +++ b/iconvdata/testdata/UTF-7-IMAP..UTF8 @@ -0,0 +1,32 @@ +አማርኛ Amharic +česky Czech +Dansk Danish +English English +Suomi Finnish +Français French +Deutsch German +Ελληνικά Greek +עברית Hebrew +Italiano Italian +Norsk Norwegian +Русский Russian +Español Spanish +Svenska Swedish +ภาษาไทย Thai +Türkçe Turkish +Tiếng Việt Vietnamese +日本語 Japanese +中文 Chinese +한글 Korean + +// Checking for correct handling of shift characters ('&', '-') after base64 sequences +한글& +한글- + +// Checking for correct handling of litteral '&' and '-' +---&&- + +// The last line of this file is missing the end-of-line terminator +// on purpose, in order to test that the conversion empties the bit buffer +// and shifts back to the initial state at the end of the conversion. +A≢Α \ No newline at end of file |