Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Target Management » Character encoding in TM terminal plugin in Eclipse
Character encoding in TM terminal plugin in Eclipse [message #1771618] Mon, 28 August 2017 16:35 Go to next message
Gunjan Aggarwal is currently offline Gunjan AggarwalFriend
Messages: 7
Registered: December 2014
Junior Member
I am using TM Terminal to run a Terminal inside Eclipse. I use it to launch afl-fuzzer inside Eclipse. Somehow character encoding in the Terminal in Eclipse is different from when I run the process in Linux terminal itself.

For example: when I run AFL-fuzzer in a terminal in Eclipse this is how the UI shows up:

But when I run Afl-Fuzzer in a terminal outside of Eclipse, this is how UI shows up:

Just to be sure that this issue happens everywhere, I tried to use TM terminal on another Linux machine and UI is rendered a lot better in Eclipse:

I can't figure out the difference because of which UI rendered differently. I am using:

- Eclipse version Neon (4.6.3) on both machines
- TM Terminal version 4.1.0 on both machines

Can you please suggest why characters are not encoded properly on one machine?


Re: Character encoding in TM terminal plugin in Eclipse [message #1771640 is a reply to message #1771618] Tue, 29 August 2017 06:14 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
I suspect that your application tries to use the vt100 "alternate character set" for drawing box characters:

The Eclipse terminal doesn't support these vt100 "alternate charset" escape sequences as of today. It looks like on your 2nd Linux host, a different TERM environment variable is set. This causes your application to also not use the vt100 box drawing characters, and fall back to plain ASCII characters.

I suggest that you run "echo $TERM" on your 2 Linux hosts and compare the setting. You may run "export TERM=ansi" in the Eclipse Terminal to tell your application that vt100 special escape sequences are not supported. Is one of your 2 linux host actually a remote host accessed by ssh or similar? What happens if you run "ssh remotehost" or "ssh localhost" in the Eclipse terminal to run your app there?

By default, the Eclipse terminal sets TERM=xterm in order to enable some special functionality, which allows us to wrap long lines (and properly copy/paste them without embedded fake newlines, as well as unwrap them when the terminal width changes). IIRC, xterm is a superset of vt100 and therefore an application may think that we also support the alternate charset (which we don't). Setting your TERM=ansi as mentioned above will turn off the line wrapping functionality as a side-effect.

Another possible cause of your issue is different fonts in your various terminals. Unicode does include box drawing characters, but only if your font includes those unicode codepoints. Environment variables such as LC_* may impact the usage of fonts and unicode codepoints, so dumping your entire environment ("env > env.txt") and attaching it here might help us to further diagnose. The encoding as per LC_* should match the encoding you choose in the "Terminal open dialog". To change the font in the Eclipse Terminal, use Window > Preferences > General > Appearance > Colors and Fonts and change the "Terminal Console Font".

HTH, Let us know how it goes!
Previous Topic:[terminal] Command interpreter Java API
Next Topic:Eclipse C/C++ Remote Development Tools
Goto Forum:

Current Time: Mon Sep 26 13:09:55 GMT 2022

Powered by FUDForum. Page generated in 0.01231 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top