X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:to:subject:references :content-type; q=dns; s=default; b=U7hncwqZc8xQpH3kW1syCM5Zugrgh J0wSly2sZB11+uZ3LxJQONC1skePY8LXZfpik+WCjZqWreZITWcebdFV0hzcet7Q M64j2bc22rykRMYyUOPc2hMMiqSuMhO/hVFs8lct2YpnN5kF4wagZdSw2Yl/SSzT FzwT9dm9Dvlxk8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:to:subject:references :content-type; s=default; bh=EWKGHQmOPr6bfZBwY4Xi8KPVpWI=; b=Ima O2o4uS6AemyisyzvtH2WlyraZMgMQ0l5AZ8U+ld2NFeTGhuyZYxDqclyf/EOge8q 7wlpXVlTva3wmXLJgYKeryB+tr6PwetyULf/zNii1rkN9SYbPaF7lTZx8yv98+Lg /jyYoHmL7cGjjqcFCN4YSG8x8JrDygtqdj6UU6EY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=CAPITAL, H*M:1c69fb81, Hx-languages-length:1053, H*M:google X-HELO: mail-oi0-f67.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:to:subject:references:user-agent; bh=wy+GPAkREd9YhrRPBKh9/J7FiLmBP9AybPI0RiTFszc=; b=rKOryJKO9WLgzMbpbiJqknFp99alr/6u2Dvrfs2bgcdPJcm1/CHYalEqnngdpFUIl5 PvlMNR+au/eryz981kbrqE3nvDhTLKKBltmXL37usPbcbKXJgSz9jddgfWNXNX8wI/RL QC9vQRx36jEAJ/3oPxLBAlTGf8tVLhSNzOnS37nm0Irbbp+c1njcGyulU6O1pAc/LmIb fspqYmodgO7UNykLVaKA3sfixZuIkwQFQ/n7idnoa92LCE6t0p21EuZ1vW6OfePVldaI nthuUVNaSu2H+gL162hyKjPm6uRlkOdukELBVMbp6Utyv/NkFeamudiA4kk1wkeg7UlN gXvQ== Message-ID: <5b8fc4ea.1c69fb81.3d08d.d585@mx.google.com> Date: Wed, 05 Sep 2018 04:58:34 -0700 (PDT) From: Steven Penny To: cygwin AT cygwin DOT com Subject: Re: Cygwin fails to utilize Unicode replacement character References: <20180905075528 DOT GA22010 AT calimero DOT vinschen DOT de> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.8.0 (cup.github.io/tryst) On Wed, 5 Sep 2018 09:55:28, Corinna Vinschen wrote: > I added DejaVu Sans Mono per the above and to my surprise I see this: > > $ cat alfa.txt > =EF=BF=BD > > So it looks like Deja Vu has a 0xfffd char. However, GetGlyphIndicesW > claims otherwise: a character that DejaVu Sans Mono actually doesnt have is: U+01C4 LATIN CAPITAL LETTER DZ WITH CARON Using this file: $ cat glyph.c #include #include int main() { CONSOLE_FONT_INFOEX ta; ta.cbSize = sizeof ta; GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), 0, &ta); HDC wh = GetDC(0); SelectObject(wh, CreateFontW(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ta.FaceName)); WCHAR xr[4] = {0xFFFD, 0x2592, 0x25A1, 0x01C4}; WORD zu[4]; GetGlyphIndicesW(wh, xr, 4, zu, 1); printf("%ls:\n", ta.FaceName); for (int q = 0; q < 4; q++) { printf(" U+%04X: %s\n", xr[q], zu[q] == 0xffff ? "failure" : "success"); } } I get this result: DejaVu Sans Mono: U+FFFD: success U+2592: success U+25A1: success U+01C4: failure -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple