telnet send IAC ABORT in some Tranditional Chinese UTF-8 character

Bug #1719758 reported by 黃于真
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
netkit-telnet (Debian)
Fix Released
Unknown
netkit-telnet (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

When I telnet to some MUD server and chat,
> say 本
telnet client send 'IAC ABORT's, and MUD server get the wrong input.

1. what telnet send :
telnet> toggle
Need an argument to 'toggle' command. 'toggle ?' for help.
telnet> toggle options
Will show option processing.
say 本
SENT IAC ABORT
SENT DO TIMING MARK

2. What MUD server received (from strace)
readv(8, [{"say \346\377\356\377\375\6", 10}], 1) = 10
epoll_ctl(3, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLOUT, {u32=8, u64=8}}) = 0
writev(8, [{"\377\373\6", 3}], 1) = 3

'本' is 0xe6,0xac,0x9c
but the MUD server got :
0xe6, 0xff, 0xee, 0xff, 0xfd, 0x06

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netkit-telnet (Ubuntu):
status: New → Confirmed
Revision history for this message
Camilio (camille-gonnet-free) wrote :

The same problem happens with other UTF8 characters, like Ü or Ï.
For instance, Ü is coded as 0xC3 0x9C. As telnet is basically 7-bits, 0x9C is seen as 0x1C, which is Ctrl-O. And Ctrl-O is used to flushoutput.
So, telnet sends the 0xC3, then send the flushoutput IAC sequence.
本 is coded as 0xe6 0x9c 0xac, so there is also the Ctrl-O found inside.

To make it work, you need to deactivate some control codes, like those at least:
```
set flushoutput off
set quit off
```

Then netkit-telnet package should be corrected to detect UTF8 sequences and to ignore extra UTF8 bytes for control sequences.

Revision history for this message
Brian Murray (brian-murray) wrote :

The upstream Debian bug report makes reference to the man page which includes the following:

-8 Request 8-bit operation. This causes an attempt to negotiate the
        TELNET BINARY option for both input and output. By default telnet
        is not 8-bit clean.

Have you tried using that option?

Changed in netkit-telnet (Ubuntu):
status: Confirmed → Incomplete
Changed in netkit-telnet (Debian):
status: Unknown → Confirmed
Changed in netkit-telnet (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.