2017-10-23 01:16 AM
Hello.
I am troubled with garbled characters of CubeMX's code generation function.
The version of CubeMX is 4.22.1.
The development environment is SW4STM32.
The reproduction method is explained below.
1. Generate the code with CubeMX.
2. Open the project with SW4STM32 and change the character code of the project to UTF-8.
3. Open main.c and add Japanese characters to the USER CODE area.
4. Quit SW4STM32.
5. Start CubeMX and generate the code again without changing anything.
6. When SW4STM32 is started and main.c is opened, it can be confirmed that garbled characters are occurring. You can also check garbled characters in the text editor.
From this, I think that CubeMX has the cause of garbled characters.
Is there any workaround?
Best Regards
Yas
#cubemx-4.222018-02-08 07:29 AM
Hello
Hirano.Yasuhiro
,Do you try to open the main.c generated by CubeMX with an text editor you currently use?
I think that the issue does not come from the generated file but comes from SW4STM32 that interprets the main.c and change yourjapanese characters (look at the settings you have in SW4STM32).
There is already a thread where we both intervened (
https://community.st.com/0D50X00009XkYH8SAN
).Could you please make the try?
BR. Jeanne