Swedish special characters not displayed in Xlite with LVGL
Is there an existing issue for this problem?
- [X] I have searched the existing issues
What part of EdgeTX is the focus of this bug?
Transmitter firmware
Current Behavior
After the update to LVGL in main branch, the "special" Swedish characters (åäöÅÄÖ) are displayed incorrectly as blanks on Xlite b/w radio. For TX16S it works as expected. Possibly the same for other languages special characters as well but I have only tested with a build of the Swedish firmware for Xlite and run it in the simulator, so not tested on the radio yet. I have attached a screenshot where "Ä" is missing in the top menu name MODELLINSTÄLLNING (model settings) and "ä" at the bottom Nedräkning (countdown).
Expected Behavior
All characters should be displayed correctly.
Steps To Reproduce
Compile main branch with "cmake -Wno-dev -DPCB=XLITE -DDEFAULT_MODE=2 -DGVARS=YES -DPPM_UNIT=US -DHELI=NO -DTRANSLATIONS=SE -DCMAKE_BUILD_TYPE=Release ../" and run in simulator.
Version
Other (Please specify below)
Transmitter
FrSky X-Lite / S / Pro
Anything else?

You also need an updated se.h file since some strings are missing in the main branch. I've not yet made a PR for this but have attached an updated file (se_h.txt). se_h.txt
You also need an updated se.h file since some strings are missing in the main branch. I've not yet made a PR for this but have attached an updated file (se_h.txt). se_h.txt
Would be cool if you could actually make a PR for the translation file ;-)
Absolutely, that's the plan but I would like to work on the translations a bit more first :) I need a few more days.
I have now created a PR (#2095), hope I did it right. I'm not at all comfortable with github.
@rotorman has now merged PR #2095 to main :)
@ulfhedlund so this issue here can be closed, right?
@raphaelcoeffic I'm afraid not. When I just tested (in Companion simulator on Linux) newly built firmware from main the issue remains, i.e. special characters are still not displayed correctly. PR #2095 did not address this issue at all.
Just tested with Danish translations on Xlite and it is the same there - special characters are not displayed correctly.
Is there anything I can do to help with this? I suppose this issue is the same for all B/W radios (I have tested Xlite, X7 and X9D+) and for other languages than Swedish too (Danish for example). If anything that does not include coding needs to be done perhaps I can help. I am certainly willing to try.
Maybe there is a bug in the utf-8 decoder
It look like the character lookup tables for some language are missing in https://github.com/EdgeTX/edgetx/blob/main/radio/src/gui/common/stdlcd/utf8.cpp @ulfhedlund you can try to add those according to the other language chars, if you are able to compile the code to test it.
Thank you, I have a local environment to build software so I'll add those and test it out.
@gagarinlg - I did as you suggested and this issue now seems to be fixed! I have built firmware for X9D+, X7 and Xlite in Swedish and tested in simulator. All characters are now properly displayed.
I'll add a PR for this as soon as possible.
@HThuren: I also tried to add the Danish special characters and tested on X7 in simulator but it didn't work and the Swedish åäöÅÄÖ displayed instead. Maybe better than empty but not correct. Not sure why and I'll leave that to more capable hands. So I removed this from utf8.cpp: #elif defined(TRANSLATIONS_DA) static wchar_t _utf8_lut[] = { L'å', L'æ', L'ø', L'Å', L'Æ', L'Ø', };
@ulfhedlund Thank you, I wasn't aware of this issue. So great you has it fixed :-)
@HThuren: Right now Danish characters are still displayed as blanks (" "). I tried fixing this but ended up removing the above lines, since the Danish special characters weren't displayed properly, but rather the Swedish equivalents.
If you are happy with that, you can add the four lines above to utf8.cpp and make a PR. Svenska åäöÅÄÖ är kanske bättre än inget, till det går att ordna de korrekta danska bokstäverna?
And the we look like idiots, because we can not add the correct Danish characters 🤔😜 We should fix the characters, can't be too hard.
Arh, now I understand. this section must be ok, but I'm not sure how it works, ie the order of charaters. Normally we use æøå, ÆØÅ, but .. #elif defined(TRANSLATIONS_DA) static wchar_t _utf8_lut[] = { L'å', L'æ', L'ø', L'Å', L'Æ', L'Ø', };
https://github.com/EdgeTX/edgetx/blob/main/tools/charset.py
There is no danish support in that file, so the danish special characters are not added.
OK, leave it for now, I add (and want to test) after this PR #2259 are added to main.
@HThuren Basically what this means is for Danish, you'd need both the
#elif defined(TRANSLATIONS_DA)
static wchar_t _utf8_lut[] = {
L'å', L'æ', L'ø', L'Å', L'Æ', L'Ø',
};
block you gave above in radio/src/gui/common/stdlcd/utf8.cpp
as well as a corresponding entry in https://github.com/EdgeTX/edgetx/blob/8aa2b55c503de70d5a7c0df1ca499597f3434613/tools/charset.py#L58-L72
and also at https://github.com/EdgeTX/edgetx/blob/8aa2b55c503de70d5a7c0df1ca499597f3434613/tools/charset.py#L17
at minimum for B&W radios to show those 'special' Danish characters properly. There may be other stuff that's needed, but that is all that is jumping out at me atm.
Hi @ulfhedlund Thank you for your support with this case. Danish characters are now drawn with Paint, and the files must exist in radio\src\fonts\sqt5 and radio\src\fonts\std and refered in fonts.cpp and utf8.cpp :-) https://github.com/EdgeTX/edgetx/pull/2271