From patchwork Wed Aug 19 23:06:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gautier X-Patchwork-Id: 40306 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CC35386100E; Wed, 19 Aug 2020 23:05:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CC35386100E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1597878343; bh=c9uim1kQ824wNFlxFduTdSKaWc7WI+tsGbkaP3oVLQM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=R05RE0im0rbozdXqEK81SJR2ln2dOAzC1gvnNG52a+BkMNAMp1p3rTaiPNnoHZ2N2 97uTw/iDSzT6HGU8ZX/o1/RWioHimeCOWcxEiXp/QBWiVqWj3KxQ60WHH/OtrK63Hb QeZDET8NMtKxqIItzZj96z88s6WKZkw1HywFxwgM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mout-y-111.mailbox.org (mout-y-111.mailbox.org [IPv6:2001:67c:2050:1::465:111]) by sourceware.org (Postfix) with ESMTPS id D6EEB3857C5A for ; Wed, 19 Aug 2020 23:05:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6EEB3857C5A Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4BX3KZ1sH6zQkm0 for ; Thu, 20 Aug 2020 01:05:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id JIamIpIs46-z for ; Thu, 20 Aug 2020 01:05:33 +0200 (CEST) To: libc-alpha@sourceware.org Subject: [PATCH 0/5] iconv: module for MODIFIED-UTF-7 Date: Thu, 20 Aug 2020 01:06:57 +0200 Message-Id: <20200819230702.229822-1-mg@max.gautier.name> MIME-Version: 1.0 X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.53 / 15.00 / 15.00 X-Rspamd-Queue-Id: DC99C175A X-Rspamd-UID: 680816 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Max Gautier via Libc-alpha From: Max Gautier Reply-To: Max Gautier Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" These patches implement a conversion module for "modified UTF-7" described by RFC 3501 as part of the IMAP4rev1 specification (in section 5.1.3[1]). This is the encoding used by convention by IMAP server to describe internationalized mailbox names. I'm trying to make isync[2] (an IMAP synchronizer) support that encoding ; implementing it in glibc (vs making a custom gconv-module) seems (to me) a sensible move, since this will allow other IMAP clients to reuse that work. Also, it's easier to reuse the boilerplate than to remake my own. The conversion is based on the existing UTF-7 module ; I have merely copied it, then changed the necessary parts to make UTF-7 into MODIFIED-UTF-7. I am unaware of an official name for the encoding, so I used "MODIFIED-UTF-7". There might be better choices, if someone has insights on that. I added test files (last patch) but I'm not sure `make check` actually tests the stateful character sets (I'm not very familiar with iconv or the glibc build system). I would appreciate feedback, even if it is only to say you think that module does not belongs in glibc. Thank you, Max Gautier [1]: https://tools.ietf.org/html/rfc3501#section-5.1.3 [2]: https://isync.sourceforge.io/