Hi!
I'm using Geany 1.22 on Fedora Linux.
The problem:
reST formatted text containing Non-ASCII characters (e.g. German umlauts)
in section titles isn't properly shown in Geany's "Symbols" window: Those Non-ASCII titles aren't shown at all.
Reason:
The implemented vStringLength(name) counts the bytes and not the characters of the title. In utf-8/16 that may not be the same...
Comparing it to the length of the title adornment (line of underlines) gives wrong results.
Solution (at least for utf-8):
Do not count the utf-8 continuation bytes any longer.
I attached a simple solution by recalculating name_len.
Since I'm not a C-coder that solution might not be perfect, but for me it works.
Christian
Diff file for tagmanager/rest.c
Since the text being parsed is always UTF-8 your simple solution should work.
I fixed it slightly differently in Git for better handling of non-UTF-8 input, but the idea is the same. Thanks for reporting & investigating this!
@elextr: no, input isn't always UTF-8. It's UTF-8 if we feed the parser with a buffer, but not necessarily if we parse the real file (e.g. with `geany -g`).