summaryrefslogtreecommitdiff
path: root/docs/wincmd.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/wincmd.rst')
-rw-r--r--docs/wincmd.rst18
1 files changed, 1 insertions, 17 deletions
diff --git a/docs/wincmd.rst b/docs/wincmd.rst
index 901ee95..5727f2f 100644
--- a/docs/wincmd.rst
+++ b/docs/wincmd.rst
@@ -3,11 +3,7 @@ Windows Console Notes
.. versionadded:: 6.0
-Until Click 6.0 there are various bugs and limitations with using Click on
-a Windows console. Most notably the decoding of command line arguments
-was performed with the wrong encoding on Python 2 and on all versions of
-Python output of unicode characters was impossible. Starting with Click
-6.0 we now emulate output streams on Windows to support unicode to the
+Click emulates output streams on Windows to support unicode to the
Windows console through separate APIs and we perform different decoding of
parameters.
@@ -22,18 +18,10 @@ performed to the type expected value as late as possible. This has some
advantages as it allows us to accept the data in the most appropriate form
for the operating system and Python version.
-For instance paths are left as bytes on Python 2 unless you explicitly
-tell it otherwise.
-
This caused some problems on Windows where initially the wrong encoding
was used and garbage ended up in your input data. We not only fixed the
encoding part, but we also now extract unicode parameters from `sys.argv`.
-This means that on Python 2 under Windows, the arguments processed will
-*most likely* be of unicode nature and not bytes. This was something that
-previously did not really happen unless you explicitly passed in unicode
-parameters so your custom types need to be aware of this.
-
There is also another limitation with this: if `sys.argv` was modified
prior to invoking a click handler, we have to fall back to the regular
byte input in which case not all unicode values are available but only a
@@ -55,10 +43,6 @@ stream will also use ``utf-16-le`` as internal encoding. However there is
some hackery going on that the underlying raw IO buffer is still bypassing
the unicode APIs and byte output through an indirection is still possible.
-This hackery is used on both Python 2 and Python 3 as neither version of
-Python has native support for cmd.exe with unicode characters. There are
-some limitations you need to be aware of:
-
* This unicode support is limited to ``click.echo``, ``click.prompt`` as
well as ``click.get_text_stream``.
* Depending on if unicode values or byte strings are passed the control