#984814 fbless: search is broken

Package:
fbless
Source:
fbless
Description:
terminal fiction book reader
Submitter:
Stepan Golosunov
Date:
2021-03-08 16:51:03 UTC
Severity:
normal
#984814#5
Date:
2021-03-08 16:37:43 UTC
From:
To:
After upgrade of fbless from 0.2.3-3 to 0.2.3-4 search is no longer
working.  </> anything <ENTER> always ends with

Traceback (most recent call last):
  File "/usr/bin/fbless", line 23, in <module>
    MainWindow().main_loop()
  File "/usr/lib/python3/dist-packages/fbless_lib/main.py", line 747, in main_loop
    self.search()
  File "/usr/lib/python3/dist-packages/fbless_lib/main.py", line 409, in search
    s = str(s, default_charset, errors='ignore')
TypeError: decoding str is not supported


Additionally, when non-ascii letters are used they are displayed as if
utf-8-encoded text was treated as latin1-encoded text and then recoded
to utf-8.  I.e.,

/фыва

becomes

Search pattern: Ñ Ñ Ð²Ð°


Looks like curses module works differently with text encodings in
python3.