add docs and changelog for #830
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent 6cafd32 · Browse files · 2 files·+13 added−2 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+13 added−2 removed
- other:+13 added−2 removed
Provenance
- Commit
3496086- Tree
5ae58b1- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
6cafd32
2 files changed+13 added−2 removed
modified:docs/wincmd.rst+9 added-2 removed
57 unmodified lines58 This hackery is used on both Python 2 and Python 3 as neither version of59 Python has native support for cmd.exe with unicode characters. There are60 some limitations you need to be aware of:61 62-* this unicode support is limited to ``click.echo``, ``click.prompt`` as62+* This unicode support is limited to ``click.echo``, ``click.prompt`` as63 well as ``click.get_text_stream``.64-* depending on if unicode values or byte strings are passed the control64+* Depending on if unicode values or byte strings are passed the control65 flow goes completely different places internally which can have some66 odd artifacts if data partially ends up being buffered. Click67 attempts to protect against that by manually always flushing but if68 you are mixing and matching different string types to ``stdout`` or69 ``stderr`` you will need to manually flush.70+* The raw output stream is set to binary mode, which is a global71+ operation on Windows, so ``print`` calls will be affected. Prefer72+ ``click.echo`` over ``print``.73+* On Windows 7 and below, there is a limitation where at most 64k74+ characters can be written in one call in binary mode. In this75+ situation, ``sys.stdout`` and ``sys.stderr`` are replaced with76+ wrappers that work around the limitation.77 78 Another important thing to note is that the Windows console's default79 fonts do not support a lot of characters which means that you are mostly80 limited to international letters but no emojis or special characters.modified:CHANGES.rst+4 added
85 unmodified lines86 - Update doc to match arg name for ``path_type``. (`#801`_)87 - Raw strings added so correct escaping occurs. (`#807`_)88 - Fix 16k character limit of ``click.echo`` on Windows. (`#816`_,89 `#819`_)90+- Overcome 64k character limit when writing to binary stream on91+ Windows 7. (`#825`_, `#830`_)92 - Add bool conversion for "t" and "f". (`#842`_)93 - ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets94 printed in error output. (`#860`_)95 - Fixed the behavior of Click error messages with regards to Unicode117 unmodified lines213 .. _#816: https://github.com/pallets/click/pull/816214 .. _#819: https://github.com/pallets/click/pull/819215 .. _#821: https://github.com/pallets/click/issues/821216 .. _#822: https://github.com/pallets/click/issues/822217+.. _#825: https://github.com/pallets/click/issues/825218+.. _#830: https://github.com/pallets/click/pull/830219 .. _#842: https://github.com/pallets/click/pull/842220 .. _#860: https://github.com/pallets/click/issues/860221 .. _#862: https://github.com/pallets/click/issues/862222 .. _#863: https://github.com/pallets/click/pull/863413 unmodified lines