Skip to main content
MTana.1
Associate II
May 8, 2025
Question

[STM32CubeMX 6.14.1] text garbling

  • May 8, 2025
  • 3 replies
  • 979 views

When I generated the source code with STM32CubeMX 6.14.1, my Japanese comments in USER CODE area are garbled. The character code is Shift_JIS. The version 6.12.1 is no problem.

Could you please confirm and modify ASAP?

3 replies

STTwo-32
Technical Moderator
May 9, 2025

Hello @MTana.1 

Could you please add more details on that (a screenshot of the error and the .ioc file that reproduce it will do the job).

Best Regards.

STTwo-32

MTana.1
MTana.1Author
Associate II
May 9, 2025

Could you please confirm the attached?

STTwo-32
Technical Moderator
May 9, 2025

I've generated the project throw the STM32CubeMX .IOC FILE THAT YOU have sent, and I've added the comments you have added. After compiling the code (generated on the STM32CubeIDE V1.18.1), closing the project and reopen it in another workspace, the comment seems to be fine:

STTwo32_0-1746780079402.png

Best Regards.

STTwo-32

MTana.1
MTana.1Author
Associate II
May 9, 2025

Thank you for your prompt confirmation.

Please try below.

 

1) Open ioc file.

2) Generate code.

3) Replace main.c which is generated to main(before).c and rename to main.c

4) Generate code again.

STTwo-32
Technical Moderator
May 9, 2025

I think this is related to the text editor that you are using. I've seen the same behavior with after opening main(before).c file with notepad. But it works fine with the notepad++.

Best Regards.

STTwo-32

MTana.1
MTana.1Author
Associate II
May 9, 2025

Thank you for your confirmation. I understand your situation.

However, I didn't see the same problem on 6.12.1. What was changed?

Christian N
ST Employee
May 9, 2025

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.