Descriptive Problem Summary:
Space Station 13: Paradise Station Codebase
ASCII code 239 = ´ ( Acute accent ) character will not display to the chat, if the character is located in the player's flavour text it will not allow examining of the player.
Numbered Steps to Reproduce Problem:
Load Paradise SS13 code. Use Set-Flavour-Text verb. Include the character ´ in the input somewhere. Your mob can no longer be examined. You can also just print ´ in the chat and the entire line will not print.
Expected Results:
At least something to print to the chat.
Actual Results:
Nothing is printed to the chat when the ´ character is included.
Does the problem occur:
Every time? Or how often? Every time
In other games? No
In other user accounts? Yes
On other computers? Yes
When does the problem NOT occur?
In the other BYOND games.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Uncertain, however, being not able to examine someone has been an issue dating back a few years which may have also been a result of this.
Workarounds:
Have yet to find any way to display ´ to the chat
ID:2399401
Sep 15 2018, 11:22 am
|
|||||||||||||
| |||||||||||||
mob/verb/Ascii239() This produces the correct output "blah%efblah" for me. Although I should point out the acute accent character is 212, not 239. I suspect the problem is that the page displayed by the browser control for this chat is using an encoding other than Windows 1292. In UTF-8 the sequence to encode B4 is C2 B4, which matches the output above. The JavaScript code is therefore sending UTF-8 to BYOND, which currently does not expect that encoding. |
MSO's blah%c2%b4blah is likely due to sending UTF-8 over IRC to the bot that handles the !dm command - the bot doesn't do any encoding conversion, so if you feed it UTF-8 it'll feed UTF-8 to BYOND, and end up as %c2%b4.
WRT 239 vs 212, the acute accent's byte value changes depending on which character set you're using; in CP850, it's 239 (0xEF); in Windows-1252/ISO 8859-1 as well as Unicode, it's 180 (0xB4). I'm not sure which encoding it's 212 in - perhaps you got confused between 0xB4 and 0xD4? world.log << url_encode("blah[ascii2text(180)]blah") prints: blah%b4blah on my system. Additionally, trying to run decodeURI("blah%b4blah") in my browser's console returns a URIError, where decodeURI("blah%c2%b4blah") works as expected. I'd guess this is caused by JavaScript expecting URI-encoded strings to be UTF-8, where this string is whatever the server's default 8-bit locale is. |
In response to GinjaNinja32
|
|
You're right, I confused B4 and D4; late night brainfart. B4 is 180.
|
The raw source of the bug is when byond's url_encode() fails to properly encode the character, or produces output that the javascript portions can't read or understand.
Rather or not this is a byond bug or a javascript bug remains to be seen, but the javascript side produces the following error on /tg/station when using the ´ character, and we use the same goonchat:
uri_encode produces the following output
which might be part of the source of this error.