Skip to content

Commit

Permalink
treat doc source as utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Dec 31, 2023
1 parent a970161 commit acefd43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions library/lua/helpdb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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*(.*)')
Expand Down

0 comments on commit acefd43

Please sign in to comment.