Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] What's the easiest way to edit EUC-JP files on a remote server from an Ubuntu 20.04 desktop?



Edmund Edgar writes:

 > However, recently I upgraded the local machine to Ubuntu 20.04 LTS, and it
 > doesn't appear to have kterm.

Did you do this as an upgrade, or a new install?  If it's an upgrade,
your old kterm should still be there.  Is the symptom that "which
kterm" doesn't find it, or that "kterm &" doesn't get you a kterm?  In
the latter case, try "which kterm" -- if it's still there but won't
run, installing/upgrading the package yourself might suffer the same
problem.  Delete package and install would be my first try.  (Well,
*I* would switch to xterm or rxvt, but I see the logic in sticking
with kterm for you. :-)

 > I guess I could probably install kterm from source, but is there a
 > supported way to edit my files?

Emacs will happily read one file in EUC, write another in ISO-2022-JP,
display the editing buffer in UTF-8, and accept keyboard input in
KOI8-U (doing all of that simultaneously takes a little effort on your
part, a total of about 42 keystrokes not including documentation
browsing ;-).  And of course it natively supports remote editing by
scp or ssh!  (XEmacs does all of that and I have a local patch that
mostly works to support WebDAV too. ;-)  Support on emacs channels is
good as long as the thought of meeting rms doesn't make you puke.

Getting serious ... There's probably still a supported Ubuntu package
for kterm that you can install with dpkg or apt or whatever the PMS is
nowadays.

xterm and rxvt now handle Unicode.  I don't know whether Ubuntu's
configuration does so by default, but if not it's easy to do.  For
xterm, X.org provides a utility called luit to support other encodings
transparently.  See the xterm documentation, options -lc and -en.
luit should work for any X11-based terminal, I think, but much less
transparently than xterm does.

I don't know about rxvt's native capabilities / how to configure for
non-UTF-8 encodings.  Why rxvt?  xterm is something of a pig, rxvt is
much lighter-weight and advertises network optimizations that xterm
may or may not implement.  In current Debian, the appropriate package
is "rxvt-unicode" (all the other rxvt* packages are now transitions to
this one).

Finally, there are all the fancy-schmancy terminal emulators:
gnome-terminal, enlightment, and I'm sure in the 20 years since I
tried anything but xterm or rxvt :-) others have been developed.  They
will all handle Unicode, but they may need a bit of bashing into
EUC-ready shape.

P.S.  As Steve S mentioned, iconv is your friend.  Again, I see your
logic in staying with kterm, but a workflow where you work with UTF-8
versions and "promote" to production with "iconv -t euc-jp -f utf-8"
provides a lot of flexibility in other aspects of the workflow.


Home | Main Index | Thread Index