Encoding UTF8 in terminal

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lesmalave
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Is there a way to set the terminal encoding to UTF8 in ModusToolBox?

I'm Linux user

0 Likes
1 Solution
lesmalave
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Yes. In fact, I currently make the change manually on the MTB or use my preferred terminal externally.

But I would like future developers to consider this as an optional setting in the MTB interface.  👍

View solution in original post

9 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

  We should have a release of the Linux Setup version for ModusToolBox, is that ok for your debugging?

Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

maybe I misunderstood the question, you were already in the Linux environment, but met the UTF8 encoding issue in the debug terminal.

lesmalave
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

I only have this problem with the MTB Integrated terminal.
I should also clarify that I can modify it manually.
My specific question. Is there a way to set the UTF8 encoding as "default" in the terminal?

I am an Arch Linux user

Thanks for reply

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hi :

  I have checked with the locale command, it shows we already set all the options to utf8.

if you want to do the encode type switch automatically when opening a file with the other encoding type,

I think it should be done manually for the specific file.

ISCNPF12B2Q5 ~/mtw3/Wi-Fi_Scan
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=

0 Likes

I mean this ...⬇️⬇️⬇️ 🙂

Screenshot_20230130_113324.png

Screenshot_20230130_113359.png

Screenshot_20230130_113416.png

Screenshot_20230130_113441.png

Screenshot_20230130_113501.png

Screenshot_20230130_113517.png

      

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

 I have installed the Linux version on Ubuntu system, I found if I create a local Terminal , it acts with UTF8, and the other Terminal with the ISO-8859-1 encoding type.

here are the pics, my version is modus 3.0:

Zhengbao_Zhang_0-1675133645567.png

 

Zhengbao_Zhang_1-1675133676191.png

 

 

 

0 Likes

⬆⬆⬆

Dude your screenshots are not from ModusToolbox's integrated terminal...

I think you are not understanding my point.

Show me in the ModusToolbox IDE settings where I can "set the built-in terminal with UTF8 default encoding"

I'm using other Eclipse based IDES like STM32CUBEIDE with the same ArchLinux environment and I haven't had this problem.

I have MTB version 3 installed too

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

Got some info here:

The Process connector is opened programmatically rather than with a UI command, so this is what we use to create an auto-switching ModusShell. The TM Terminal APIs are fairly limited and poorly documented.

Actually, I debugged into the directory:

ide_3.0\eclipse\plugins\org\eclipse\tm\terminal\view\ui\manager

the encoding type seems compiled into a class file already.

So it is better to switch the encoding type manually.

and if that is not very convenient, opening another local bash with default UTF-8 is another choice also.

0 Likes
lesmalave
Level 2
Level 2
First solution authored 10 replies posted 5 questions asked

Yes. In fact, I currently make the change manually on the MTB or use my preferred terminal externally.

But I would like future developers to consider this as an optional setting in the MTB interface.  👍