Closed dzpao closed 10 months ago
It could be caused by this code in net.c
if (!HAS_BIT(ses->telopts, TELOPT_FLAG_TELNET) && HAS_BIT(ses->charset, CHARSET_FLAG_ALL_TOUTF8))
{
char buf[BUFFER_SIZE];
size = utf8_to_all(ses, line, buf); <------ HERE
memcpy(line, buf, size);
line[size] = 0;
}
Because I want to send some IAC sub-negotiations via #send
, some of these codes may be \x00
.
Thanks, the problem is indeed with that specific code, which passes line
as a string, instead of as data.
I updated the beta version with a fix for gb1ktoutf8, would you mind testing it?
Sure, I'll take a look right away.
Tested it, now that's no problem.
\x00
cannot be sent via the#send
command when#config charset GBK1TOUTF8
. If the charset isUTF-8
, there is no problem.