FS#1610 - Uparrow and downarrow in chat box gives '?'

Attached to Project: OpenTTD
Opened by Per von Zweigbergk (pvz) - Monday, 31 December 2007, 06:37 GMT
Last edited by Jean-Francois Claeys (Belugas) - Monday, 31 December 2007, 13:13 GMT
Type Bug
Category Interface
Status Closed
Assigned To Emil Djupfeldt (egladil)
Operating System Mac OS X
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In multiplayer, if you're in the type message mode (press enter), up arrow and down arrow create ? signs in the input.

Tested on r11726 on Mac OS X PPC.
This task depends upon

Closed by  Emil Djupfeldt (egladil)
Tuesday, 01 January 2008, 18:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r11740.
Comment by Per von Zweigbergk (pvz) - Monday, 31 December 2007, 06:38 GMT
On second though, this should have Category: UI. Too late for me to change it myself.
Comment by Remko Bijker (Rubidium) - Monday, 31 December 2007, 23:18 GMT
It doesn't happen on my Linux system, so I presume it's something Mac specific.
Comment by Emil Djupfeldt (egladil) - Tuesday, 01 January 2008, 01:55 GMT
The problem comes from the fact that Apple defines unicode codepoints for the arrow keys in one of the private use areas of the unicode standard. So on OS X, the arrow keys produce valid printable characters. Only, OpenTTD is not capable of printing them (and neither should it be since the glyphs for these codepoints are platform dependent).
Comment by Per von Zweigbergk (pvz) - Tuesday, 01 January 2008, 02:57 GMT
In that case, such printing should be supressed. Nobody wants to type the uparrow/downarrow glyphs in the openttd chat.

I've done some software archeology myself, to see where that bug was introduced, and going by nightly builds it was introduced somewhere between r7176 and r7194, which is also where the unicode branch was merged in, so that supports what you're saying. I've also measured the characters actually sent on the wire, and they seem to be somewhere within the unicode private usage area as they say.

Emil, if you're taking responsibility for patching this, please post to that effect here, otherwise I'm going to start working on it.