diff --git a/docs/changelog.txt b/docs/changelog.txt index e4ef22dd5..cd3a4a639 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -64,6 +64,7 @@ Template for new versions: - wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown ## Documentation +- UTF-8 text in tool docs is now properly displayed in-game in `gui/launcher` (assuming that it can be converted to cp-437) ## API diff --git a/library/lua/helpdb.lua b/library/lua/helpdb.lua index a4e75ff0c..85371ecc4 100644 --- a/library/lua/helpdb.lua +++ b/library/lua/helpdb.lua @@ -138,6 +138,7 @@ local function update_entry(entry, iterator, opts) local tags_found, short_help_found = false, opts.skip_short_help local in_tags, in_short_help = false, false for line in iterator do + line = dfhack.utf2df(line) if not short_help_found and first_line_is_short_help then line = line:trim() local _,_,text = line:find('^'..first_line_is_short_help..'%s*(.*)')