treat doc source as utf-8

develop
Myk Taylor 2023-12-30 23:22:26 -08:00
parent a970161585
commit acefd43a13
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

@ -63,6 +63,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

@ -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*(.*)')