Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

BYTE editors are people who separate the wheat from the chaff, and then carefully print the chaff.


devel / comp.lang.python / Re: print('\N{flag: Mauritius}') not supported in py3.9

SubjectAuthor
* Re: print('\N{flag: Mauritius}') not supported in py3.9dn
+- Re: print('\N{flag: Mauritius}') not supported in py3.9Stefan Ram
`- Re: print('\N{flag: Mauritius}') not supported in py3.9Stefan Ram

1
Re: print('\N{flag: Mauritius}') not supported in py3.9

<mailman.38.1638133723.9869.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16256&group=comp.lang.python#16256

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonL...@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: print('\N{flag: Mauritius}') not supported in py3.9
Date: Mon, 29 Nov 2021 10:08:29 +1300
Organization: DWM
Lines: 36
Message-ID: <mailman.38.1638133723.9869.python-list@python.org>
References: <CADrxXXkQcFMJhAt5AGt=BL=QqHCgJ7qbx=ts0zR8H9s2L1ZMdg@mail.gmail.com>
<CAPTjJmoxxRU=-uA0_RJnocZFm6WG0+OpZXFM3TDX2Tgcr1=WBg@mail.gmail.com>
<c4f62875-5c4e-055e-cc5d-7a555e25e88f@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 0u3K6LLZvO6+m1B0SUA0PwCIUsS8Hk/ilS21WtvjSvCQ==
Return-Path: <PythonList@DancesWithMice.info>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=danceswithmice.info header.i=@danceswithmice.info
header.b=LJ9+c7p8; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(to': 0.07; 'linux,':
0.07; 'utf-8': 0.07; '=dn': 0.09; 'angelico': 0.09; 'flags': 0.09;
'from:addr:danceswithmice.info': 0.09; 'from:addr:pythonlist':
0.09; 'subject:not': 0.09; 'terminal': 0.09; '>>>>': 0.16;
'column': 0.16; 'constructed': 0.16; 'desired.': 0.16; 'flag':
0.16; 'janhangeer': 0.16; 'message-id:@DancesWithMice.info': 0.16;
"pycharm's": 0.16; 'received:51.254': 0.16; 'received:51.254.211':
0.16; 'received:51.254.211.219': 0.16; 'received:cloud': 0.16;
'received:rangi.cloud': 0.16; 'subject:supported': 0.16; 'symbol':
0.16; 'wrote:': 0.16; 'to:addr:python-list': 0.20; 'run': 0.23;
'brings': 0.26; 'local': 0.27; 'old': 0.27; 'chris': 0.28; 'header
:User-Agent:1': 0.30; 'header:Organization:1': 0.31; 'skip:" 20':
0.34; 'header:In-Reply-To:1': 0.34; 'trying': 0.35; 'display':
0.36; 'mon,': 0.36; 'those': 0.36; 'received:192.168': 0.37;
'two': 0.39; 'use': 0.39; 'table': 0.39; 'to.': 0.39; 'want':
0.40; 'here': 0.62; 'email': 0.63; 'our': 0.64; 'received:51':
0.64; 'received:userid': 0.66; 'listed': 0.67; 'above,': 0.70;
'2021': 0.71; 'names,': 0.81; 'full,': 0.84; 'subject:{': 0.84
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on vps517507.ovh.net
X-Spam-Level:
X-Spam-Status: No, score=-3.6 required=5.0 tests=ALL_TRUSTED,BAYES_00,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A autolearn=ham
autolearn_force=no version=3.4.0
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.rangi.cloud 878174AB0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1638133719;
bh=6xdhi7HVMnW3RFCe6eYh7AcZE27VpgjoEenf6ewyxQ8=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=LJ9+c7p8uARFrJWPH08oN2EfyVZGDqad2aLixGjat6q4rzlv0HynpGalH4pPIzYS6
0FIxcno3HKtFcedDwPUPJdnfFDv9QPwUYRQOhDMRIaE+gzOhcfL9wmg6SdX7ZC7ecY
nmuG7VPxUR3/U/wAYE+J0eKFCMhDUMW7o2xupga8U9yIyq3aKeJjdzISfzczbdCdcw
VwaOo3KHO2dRutC+kxTN7GxSg65YAx2O0UjXpZ9wW/DG5pc9lF8bWyWzuMh8h2XneZ
WGovuK1ISgTjWthxtONkCiD6XsqZHXTYvAPPwTj+H07bRu93vNynXosRpdW/QHs91q
G1DSxNiIlthVA==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Content-Language: en-GB
In-Reply-To: <CAPTjJmoxxRU=-uA0_RJnocZFm6WG0+OpZXFM3TDX2Tgcr1=WBg@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.37
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <c4f62875-5c4e-055e-cc5d-7a555e25e88f@DancesWithMice.info>
X-Mailman-Original-References: <CADrxXXkQcFMJhAt5AGt=BL=QqHCgJ7qbx=ts0zR8H9s2L1ZMdg@mail.gmail.com>
<CAPTjJmoxxRU=-uA0_RJnocZFm6WG0+OpZXFM3TDX2Tgcr1=WBg@mail.gmail.com>
 by: dn - Sun, 28 Nov 2021 21:08 UTC

On 29/11/2021 02.18, Chris Angelico wrote:
> On Mon, Nov 29, 2021 at 12:10 AM Abdur-Rahmaan Janhangeer
> <arj.python@gmail.com> wrote:
>
> Flags are actually constructed from multiple codepoints. What you want
> is to insert each codepoint separately. You can see them listed in the
> second column of the table you linked to.
>
>>>> "\U0001F1F2\U0001F1FA"
> '🇲🇺'
>
> To do this with names, you need the names of those two codepoints:
>
> '\U0001f1f2' REGIONAL INDICATOR SYMBOL LETTER M
> '\U0001f1fa' REGIONAL INDICATOR SYMBOL LETTER U
>
>>>> "\N{REGIONAL INDICATOR SYMBOL LETTER M}\N{REGIONAL INDICATOR SYMBOL LETTER U}"
> '🇲🇺'

Don't use Emojis that often. The colored circles (U+1F534 etc) display
in full, glorious, technicolor.

However, when trying the above, with our local flag in (Fedora Linux,
Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and "Z"
are shown with dotted-outlines. Similarly, the Mauritius' flag is shown
as "M" and "U".

Whereas here in email (Thunderbird) or in a web-browser, the flags
appear, as desired.

Is this a terminal short-coming (locale charmap -> UTF-8 - which brings
to mind the old UCS-4 questions), a font issue, or what (to fix)?
--
Regards,
=dn

Re: print('\N{flag: Mauritius}') not supported in py3.9

<combinations-20211128233230@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16258&group=comp.lang.python#16258

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: print('\N{flag: Mauritius}') not supported in py3.9
Date: 28 Nov 2021 22:34:52 GMT
Organization: Stefan Ram
Lines: 37
Expires: 1 Mar 2022 11:59:58 GMT
Message-ID: <combinations-20211128233230@ram.dialup.fu-berlin.de>
References: <CADrxXXkQcFMJhAt5AGt=BL=QqHCgJ7qbx=ts0zR8H9s2L1ZMdg@mail.gmail.com> <CAPTjJmoxxRU=-uA0_RJnocZFm6WG0+OpZXFM3TDX2Tgcr1=WBg@mail.gmail.com> <c4f62875-5c4e-055e-cc5d-7a555e25e88f@DancesWithMice.info> <mailman.38.1638133723.9869.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de lHMCbVc+9VhP8cxaN8sOJwLqYMGFopb3EOhvteKr0CbgD9
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Sun, 28 Nov 2021 22:34 UTC

dn <PythonList@DancesWithMice.info> writes:
>However, when trying the above, with our local flag in (Fedora Linux,
>Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and "Z"
>are shown with dotted-outlines. Similarly, the Mauritius' flag is shown
>as "M" and "U".

This is the modifier letter mid tone bar, Unicode U+02E7:

˧

. And this is the modifier letter extra-high tone bar, U+02E5:

Ë¥

. Here are both of them inserted by me to directly follow each other:

˧˥

. Some display systems might now have combined them into a
single symbol. It's like magic!

You can also try this code:

print( "\u02E7\u02E5" )

. If they are not combined, I think your display system /
output device just is not capable or willing to combine them.

For another example. This

n̩

is an [n] (pronunciation symbol) marked as being syllabic.
It also is transported as a sequence of two Unicode code points,
which then are hopefully combined when being displayed.

Re: print('\N{flag: Mauritius}') not supported in py3.9

<flag-20211128235320@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=16259&group=comp.lang.python#16259

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: print('\N{flag: Mauritius}') not supported in py3.9
Date: 28 Nov 2021 22:54:52 GMT
Organization: Stefan Ram
Lines: 33
Expires: 1 Mar 2022 11:59:58 GMT
Message-ID: <flag-20211128235320@ram.dialup.fu-berlin.de>
References: <CADrxXXkQcFMJhAt5AGt=BL=QqHCgJ7qbx=ts0zR8H9s2L1ZMdg@mail.gmail.com> <CAPTjJmoxxRU=-uA0_RJnocZFm6WG0+OpZXFM3TDX2Tgcr1=WBg@mail.gmail.com> <c4f62875-5c4e-055e-cc5d-7a555e25e88f@DancesWithMice.info> <mailman.38.1638133723.9869.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Gc6oX2+PVEkW/6Q93Ix1zw2ofoml0VYHpUCyVDxXq4vzIQ
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Sun, 28 Nov 2021 22:54 UTC

dn <PythonList@DancesWithMice.info> writes:
>However, when trying the above, with our local flag in (Fedora Linux,
>Gnome) Terminal or PyCharm's Run terminal; the two letters "N" and "Z"
>are shown with dotted-outlines. Similarly, the Mauritius' flag is shown
>as "M" and "U".

Try this, you guys:

import pathlib
import subprocess

filename = "tmp20211128234439+0100file.html"
path = pathlib.Path( filename )
with path.open( "w", encoding="utf-8" )as file:
print( r'<!DOCTYPE html>', file=file )
print( end=r'<html ', file=file )
print( end=r'xmlns="http://www.w3.org/1999/xhtml" ', file=file )
print( r'lang="en" xml:lang="en">', file=file )
print( end=r'<head><meta charset="UTF-8" />', file=file )
print( r'<title>Main</title></head>', file=file )
print( r'<body><p>', file=file )
print( end="\N{REGIONAL INDICATOR SYMBOL LETTER M}", file=file )
print( end="\N{REGIONAL INDICATOR SYMBOL LETTER U}", file=file )
print( r'</p></body></html>', file=file )

subprocess.Popen( filename, shell=True )

The Popen call is intended to show the HTML file in a modern browser
capable of showing the flag. If it does not work, just go ahead and
open the created file "tmp20211128234439+0100file.html" manually in
a modern browser.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor