Comment 31 for bug 1297051

Revision history for this message
boon (boon-9ft1s) wrote :

>you have to have your terminal configured to use ISO-8859-1 or so, setting it to UTF-8 cannot work with your application. Is this correct?

That is correct. In respect of Preferences / Compatibility / Encoding ...

* set to "Unicode - UTF8", it malfunctions (the C1 controls don't work, hence layout is completely stuffed, but ASCII comes out correctly - both as expected)

* set to "Western - ISO-8859-1", it works.

>if your terminal removed support for non-UTF-8, which might happen sooner or later with VTE, you'll be screwed at those raw C1 bytes

Let me say up front ... if it doesn't support ISO-8859-1 any more then it aint a terminal emulator!! So you would need to update the man page. ;-)

Also, I hope that any such change would be flagged **well in advance**.

As to whether I would be screwed ... there are two answers to that

a) I can change the application either to insert a translation layer to UTF-8 (although this would be mostly pointless) or just to use the equivalent two byte sequences instead of the C1 controls

b) What I can't change is software on which the application depends (for which I don't have source and can't change e.g. the underlying operating system)

So ... yes ... approximately screwed.

>does your app output any printable 0xA0..0xFF ISO-8859-1

With the understanding that we are talking hundreds of thousands of lines of code ... to the best of my knowledge, it does not use any such characters, just the C1 controls as far as bytes with the top bit set go.

Another consideration is ... what terminal model the emulator "advertises" compatibility with. I couldn't see any gnome-terminal setting to downgrade that but (from memory)

* if you advertise compatibility with VT200 series then you "must" support C1 controls
* if you advertise compatibility with VT100 series then you "must not" support C1 controls

In reality, terminal emulators have traditionally taken a more laissez faire approach of just supporting whatever features they want to support. ;-)

(which is why I am in the position that PuTTY works about 80% and gnome-terminal works about 80%, but their defects are not the same, and I have no fully working solution)

Whether changing the compatibility level helps I don't know. That is to say, if it advertised VT100 and actually implemented that spec *rigidly*, I don't know whether I would lose any features on which the application depends and which couldn't feasibly be worked around. I have the feeling that the loss of the VT200-specific keys would be painful, for example.