Guido sees the light: PEP 8 updated

eryk sun eryksun at gmail.com
Sun Apr 17 04:14:55 EDT 2016


On Sun, Apr 17, 2016 at 12:10 AM, Random832 <random832 at fastmail.com> wrote:
>
> On Sun, Apr 17, 2016, at 01:01, eryk sun wrote:
>> It doesn't support fonts that mix half-width and full-width glyphs.
>
> This is the most baffling bit to me. I mean, it _has_ to, for Chinese,
> Japanese, and Korean users. This support obviously exists in the code.
> Why not extend it to everyone, instead of maintaining two versions of
> whatever it's doing?

Right, the console implements this for CJK locales, in which case it
uses 2 columns for a full-width character. But based on the public
symbols, I'd guess that the implementation is tied to using a DBCS
codepage:

    0:004> x /1 /n conhostv2!*dbcs*

    ConhostV2!DBCS_SCREEN_BUFFER::CreateInstance
    ConhostV2!DBCS_SCREEN_BUFFER::`scalar deleting destructor'
    ConhostV2!DBCS_SCREEN_BUFFER::~DBCS_SCREEN_BUFFER
    ConhostV2!InitializeDbcsMisc
    ConhostV2!IsDBCSLeadByteConsole
    ConhostV2!ReCreateDbcsScreenBuffer
    ConhostV2!ReCreateDbcsScreenBufferWorker
    ConhostV2!RemoveDbcsMark
    ConhostV2!RemoveDbcsMarkAll
    ConhostV2!RemoveDbcsMarkCell
    ConhostV2!g_fIsDBCSACP

Implementing this in a Western locale would need an implementation
based on Unicode character properties.



More information about the Python-list mailing list