mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
man-pages: force encoding when reading doc sources
Force the encoding to not be dependent on the environment locale. In particular on Windows, the encoding could default to an ANSI page code, which would fail to load any file containing bytes 0x80+, i.e any multi-byte UTF-8 character. Closes #12748
This commit is contained in:
committed by
Johannes Altmanninger
parent
959cbb4259
commit
f0054336ea
@@ -218,7 +218,7 @@ latex_engine = "xelatex"
|
||||
|
||||
def get_command_description(path, name):
|
||||
"""Return the description for a command, by parsing its synopsis line"""
|
||||
with open(path) as opened:
|
||||
with open(path, encoding="utf8") as opened:
|
||||
for line in opened:
|
||||
if line.startswith(name + " - "):
|
||||
_, desc = line.split(" - ", 1)
|
||||
|
||||
Reference in New Issue
Block a user