Although Input widgets display emojis correctly when a value is set in code (I mean actual emoji like πnot :smiling_face_with_smiling_eyes:), the whole app hangs when trying to paste emoji from the clipboard on Windows 10.
As a sample code, one can use even this first example:
Input - Textual
Then copy an emoji to the clipboard and then try to paste it (either Ctr+V or Ctrl+Shift+V)
For me, the main app hangs and the respective python process needs to be terminated. The textual console continues to work.
Here is the output from the textual console:
βββββββββββββ Client '127.0.0.1' connected ββββββββββββββββββββββββββββββββββββββββββββββββββββ
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
Exception in thread Thread-1:
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
Traceback (most recent call last):
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
  File "c:\Users\user\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
    self.run()
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
  File "C:\Projekty\RPG\.py311_env\Lib\site-packages\textual\drivers\_writer_thread.py", line 60, in run
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
    write(text)
[09:56:30] PRINT                                                                                                                                                                                      app.py:1102
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 423-424: surrogates not allowed
I could reproduce this on Win10 in Windows Terminal 1.17 using PowerShell 7. Works fine on Ubuntu 22.
When run using PowerShell, but not inside Windows Terminal, nothing is pasted, but at least the app continues to work. Still, this is useless since emojis do not work in PS without WT.
Textual Diagnostics
Versions
| Name | Value | 
| Textual | 0.33.0 | 
| Rich | 13.5.2 | 
Python
| Name | Value | 
| Version | 3.11.4 | 
| Implementation | CPython | 
| Compiler | MSC v.1934 64 bit (AMD64) | 
| Executable | C:\Projekty\RPG\.py311_env\Scripts\python.exe | 
Operating System
| Name | Value | 
| System | Windows | 
| Release | 10 | 
| Version | 10.0.19044 | 
Terminal
| Name | Value | 
| Terminal Application | Windows Terminal | 
| TERM | Not set | 
| COLORTERM | Not set | 
| FORCE_COLOR | Not set | 
| NO_COLOR | Not set | 
Rich Console options
| Name | Value | 
| size | width=209, height=52 | 
| legacy_windows | False | 
| min_width | 1 | 
| max_width | 209 | 
| is_terminal | True | 
| encoding | utf-8 | 
| max_height | 52 | 
| justify | None | 
| overflow | None | 
| no_wrap | False | 
| highlight | None | 
| markup | None | 
| height | None | 
FAQ links are fixed nowβ¦
Ah, in that case no need for the conditional.
Of note:
@HubertReX The auto-generated link is correct, pointing to the FAQ; the other link is the HOWTO, which is far more comprehensive. The reason the FAQ link is broken at the moment is weβre βbetween FAQsβ (it used to be in the repo, itβs moving to the docs on website, weβve just not published the updated version of the docs yet).