[Python-ideas] π = math.pi

Ryan Gonzalez rymg19 at gmail.com
Thu Jun 1 16:05:34 EDT 2017


I'm slightly confused as to what you mean, but here goes:

So you're saying that:

- Glyphs like pi have an ambiguous width.
- Most text editors/terminals let you choose between halfwidth (roughly
normal monospace width?) and fullwidth (double the size).
- However, many East Asian fonts do NOT have halfwidth support.

Is this correct?

--
Ryan (ライアン)
Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else
http://refi64.com

On Jun 1, 2017 2:27 PM, "Masayuki YAMAMOTO" <ma3yuki.8mamo10 at gmail.com>
wrote:

Hi Stephan,


Nevertheless, I would like to point out that the encoding assumed for a
> Python3 source file never depends on the locale.
>
Yeah, as you pointed out. I'd like to correct my said.


> My understanding is that in the default encoding for Python source files
> (utf-8), East Asian Ambiguous characters must be assumed narrow. Now there
> are also legacy encodings where they are fullwidth. But it is always
> determined by the encoding, which in turn is specified or implied in the
> source file.
>
The mapping for ambiguous width assumes on East Asia legacy encodings and
non East Asia legacy encodings, but not recommend to UTF-8 and other
Unicode encodings. Displaying ambiguous width characters behave narrow by
default, it isn't related to encoding. [*]

Let me see... Several softwares have a setting that changes ambiguous width
to halfwidth or fullwidth regardless for encoding (e.g. gnome-terminal,
vim). And some fonts that are used in East Asia make glyph that is Greek
letters and other signs to adjust to fullwidth, they break layout under
halfwidth settings. It is possible that avoids these fonts, and uses multi
language support font, yet signs that are only used in East Asia don't have
halfwidth glyph no matter the ambiguous width. Therefore, in case of using
East Asia language, it is difficult that set displaying Greek letters as
halfwidth.

Regards,
Masayuki

[*] http://unicode.org/reports/tr11/#Recommendations

_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170601/57e7be3f/attachment.html>


More information about the Python-ideas mailing list