[haiku-development] More encodings support in Terminal ( related to hrev43252 - src/apps/terminal)

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 13 Nov 2011 15:28:40 +0200

Hi All,

There are some unclear issues regarding my last improvements in Terminal encodings support. Please share your meaning about it below.

On Sun, 13 Nov 2011 14:00:08 +0100 (CET), zharik@xxxxxx wrote:
Revision:    hrev43252
[...]

Refactoring of 8-bit encodings support.
[...]

* Private list of supported encodings (Encoding.cpp) was replaced by
  using BPrivate::BCharacterSetRoster functionality. That allows to
  use centralized info about encodings in unified with other
  applications (Mail & StyledEdit for example) way. Most of currently
  enumerated in UTF8.h encodings now available in Terminal.
  Note that UCS-2 and UTF-16 are temporary (???) excluded from the
  list of encodings supported by Terminal.

Are the UCS-2 and UTF-16 support has any sense in our Terminal? I can imagine people accessing Windows Telnet in DOS cp437/cp866 encodings but what about UCS-2? The chcp 65001 changes code page to UTF-8 and looks like the standard way to get multi-byte support in Windows console and remote sessions. Should we implement it at all?

* Special note about "Text Encoding" entry in Preference File:
  So known "shortname" of encoding was used in the preferences file.
  For details look on the encodings list in previous version of
  Encoding.cpp. As result of migrating to BCharacterSet-provided
  resources this list was deleted and is not available anymore.
  Instead of it the IANA name of the character encoding targeted
  to be used for this purposes. Frankly speaking this part looks
  like not working at the moment. The value of text encoding is
  hardcoded to "UTF-8" now and is not affected by any operations
  in Terminal menu. Note that "shortname" for default encoding
  was "UTF8" but the saved value is "UTF-8" - and they are looking
  not dependent at all. So this change should not introduce any
  kind of backward incompatibility.

The "Text Encoding" entry in preferences file looks like rudimentary and is not affected by any operation in current version of Terminal. How it should be implemented at all? What do you think?

Thank you!

--
Kind Regards,
   S.Zharski

Other related posts: