Skip to main content
bbee
Senior
April 2, 2025
Solved

CubeMX 6.14 encoding of generated code changed?

  • April 2, 2025
  • 2 replies
  • 542 views

Hi,

just made an update of CubeMX from 6.11.1 to 6.14.
The problem I have is that our comments within user blocks were ISO-8859-1 encoded and this never was a problem until now and with 6.14, when we generate code, all Umlauts are replaced with the UTF-8 sequence EF BF BD.

Is there an option to tell CubeMX to use ISO-8859-1 for reading and encoding?

Best answer by bbee

Nope, as I said, the files are allready ISO-8859-1 encoded before the generation and this wasn't a problem at least until version 6.11.1.
Meanwhile I found a workaround and added the line

-Dfile.encoding=ISO-8859-1

into STM32CubeMX.l4j.ini

Now CubeMX reads and generates the files in the correct encoding again.


2 replies

AScha.3
Super User
April 2, 2025

Hi,

afaik this has not much to do with the CubeMx version, but with the IDE version and especially its settings:

 

AScha3_0-1743600742758.png

...so try:

AScha3_1-1743600794392.png

- but there might be other definitions in the settings and preferences...just look. :)

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
bbee
bbeeAuthorBest answer
Senior
April 2, 2025

Nope, as I said, the files are allready ISO-8859-1 encoded before the generation and this wasn't a problem at least until version 6.11.1.
Meanwhile I found a workaround and added the line

-Dfile.encoding=ISO-8859-1

into STM32CubeMX.l4j.ini

Now CubeMX reads and generates the files in the correct encoding again.


Pavel A.
Super User
April 2, 2025

It's the time to move to utf-8, for all tools.