My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1360: UTF-8 decoder is not function of input stream; will break when UTF-8 sequence split across reads
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  May 2012


Sign in to add a comment
 
Reported by winst...@gmail.com, Apr 30, 2012
Affected Version: hterm

What steps will reproduce the problem?
1. Run: perl -e '$|=1; print "Here"; print "\342"; print "\200"; print "\231"; print "s Johnny.\n"'
2. Run: perl -e '$|=1; print "Here"; print "\342"; print "\200"; sleep 1; print "\231"; print "s Johnny.\n"'

What is the expected output? What do you see instead?
Both #1 (no sleep) and #2 (with sleep) should produce the same output: "Here’s Johnny."

hterm only correctly decodes #1. With a sleep inserted, #2 prints "Here’s Johnny." This suggests that hterm will give varying output depending on how, e.g., SSH chooses to divide its octets across TCP segments (and therefore across writes to the pty).

Please provide any additional information below.
In general it is preferable for the terminal's emulation to be strictly a function of the input octet sequence, without regarding to timing or the chunking of octets across buffers returned by read().
Apr 30, 2012
#1 winst...@gmail.com
I wish I could delete or close my own bug report! I clicked the wrong "report bug" button. I will refile this against Chromium OS.
May 1, 2012
#2 sop@google.com
Wrong project
Status: Invalid
Sign in to add a comment

Powered by Google Project Hosting