From owner-freebsd-i18n@freebsd.org Sun Apr 9 13:06:32 2017 Return-Path: Delivered-To: freebsd-i18n@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50F5BD35811 for ; Sun, 9 Apr 2017 13:06:32 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC2BF6A5 for ; Sun, 9 Apr 2017 13:06:31 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f65.google.com with SMTP id 75so1017981lfs.3 for ; Sun, 09 Apr 2017 06:06:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=obJ7RF2d19Qp1ERnptiAuh13xHMim/PsZDS/aFSbH18=; b=GEQynawcd6Ct5SQ+riA8Yt/+SOFFKi5Pi+OKrtTCeOxwjeKuY8jkfAef3sje6XzIdB qdFrldme1kmKfHP96bvV4I5nN65/tDFPoHZrU7C7cOrD+du5h+mStl0EHaSow1NGucjA MI9q8RPCInGZ+SuQk0kf506BfvN83umS+73cO+JXpzWbErKsiTZPPsEyrTgx77Wz3S+B np30gbKOxqLa+ZyrZPUTgi8lOaZYBeBH4birBxGI/HFdyh0LYeYiX/mo9VLvST9A4z0p 4YwNbr3wN0ob2Xlsg2O8Op5ozPq2kNXfpFv4pofWj/M4eqU0Tswr3CLDtwhM4H2k+M9p skrA== X-Gm-Message-State: AFeK/H0NN5Q7jMKuyqam7vE/zXnWi4A1wqZpAIH9rBa1W3VfkYFW5HWUhJjvsa7vvkKP8w== X-Received: by 10.25.25.207 with SMTP id 198mr16120422lfz.1.1491743189244; Sun, 09 Apr 2017 06:06:29 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id 85sm2123286ljj.56.2017.04.09.06.06.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 06:06:28 -0700 (PDT) Subject: Re: citrus/BSD iconv doesn't respect ICONV_SET_DISCARD_ILSEQ flag To: Lev Serebryakov , freebsd-i18n@freebsd.org References: <137414834.20170409140646@serebryakov.spb.ru> From: Andrey Chernov Message-ID: <53b57139-8e68-da83-8fe8-e132ea524b6d@freebsd.org> Date: Sun, 9 Apr 2017 16:06:24 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <137414834.20170409140646@serebryakov.spb.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 13:06:32 -0000 On 09.04.2017 14:06, Lev Serebryakov wrote: > I understand, that iconvctl(3) is GNU extension, but as soon as citurs > iconv used by FreeBSD libc formally supports this API and > ICONV_SET_DISCARD_ILSEQ flag, they should work, IMHO. But they don't. If I > try to convert simple UTF-8 string with illegal sequence to ASCII (all > legal character in this string is ASCII), it stops on illegal sequence and > returns error. GNU iconv from ports works correctly. I didn't try UTF-16 > and UTF-32/UCS-4, but by looking at code, I'm afraid, they have same > problems. I need to add that our iconv also don't support anything after // forcing ports using GNU iconv: /* * Remove anything following a //, as these are options (like * //ignore, //translate, etc) and we just don't handle them. * This is for compatibility with software that uses these * blindly. */ //ignore is analogue of ICONV_SET_DISCARD_ILSEQ on.