2023-01-05 12:28 AM
I am using some UTF-8 characters in my code that shows messages to the user, and some of them get converted to some other code page when I regenerate the code. This happens when generating code both from CubeIDE ioc editor and CubeMX.
This is how my code looks before generation:
And after generation:
The characters �?, Ę and Ń get messed up.
CubeIDE version: 1.11.0
CubeMX version: 6.7.0
Solved! Go to Solution.
2023-01-13 06:10 AM
Hi Kazimierz Król ,
Thank you for your contributions and for your detailed explanations.
The issue has been reported to STM32CubeMX development team.
Internal ticket number: 142800 (This is an internal tracking number and is not accessible or usable by customers).
I will keep you posted with updates, and I hope that this answered your question.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Regards,
Rim
2023-01-09 08:15 AM
Hello Kazimierz Król,
Thank you for reporting this issue !
The C standard depends on the compiler and how it copes with the various character sets.
In gcc, you should be able to override the default (UTF-8) encoding using the -fexec-charset switch
Invocation (The C Preprocessor) (gnu.org).
You might be able to use ASCII or some of the charsets listed here libiconv - GNU Project - Free Software Foundation (FSF).
Regards,
Rim
2023-01-09 10:17 PM
Thank you for the suggestions. I have already used other character encodings, but for this project I want to use UTF-8 specifically. CubeMX should not interfere with that.
2023-01-13 06:10 AM
Hi Kazimierz Król ,
Thank you for your contributions and for your detailed explanations.
The issue has been reported to STM32CubeMX development team.
Internal ticket number: 142800 (This is an internal tracking number and is not accessible or usable by customers).
I will keep you posted with updates, and I hope that this answered your question.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Regards,
Rim