windows
1 TopicBug in RDS Web Client - Copied text in RD session improperly encoded
As the title describes, there appears to be a bug in the HTML5 web client for Remote Desktop Services. This bug is present in both 2.1.85.0 and 2.1.87.0, and possibly earlier. When text is copied to the clipboard within a remote session (tested via a published RemoteApp), the text will occasionally be stored into the clipboard of the local machine encoded in UTF-8 instead of UTF-16 as it is supposed to be. When pasted into an application on the client machine, the UTF-8 encoded text (stored as CF_UNICODETEXT) is interpreted as UTF-16 (as that's how it's supposed to be encoded in memory as that's what Windows uses internally), resulting in meaningless output/mojibake. As an example, the text "Given" is copied from a Remote Desktop session (via the web client). The endpoint has these formats on the clipboard: Copied text CF_UNICODETEXT hex (padded) CF_TEXT hex Decoded text - UTF-8 Decoded text - UTF-16LE Given 47 69 76 65 6E 00 00 00 3F 3F 6E 00 Given 楇敶n The behavior is seemingly random. Most of the time, text is copied without issue. Once out of every 5-10 times, however, the UTF-8 encoded text is incorrectly written to the clipboard. Some additional information about this behavior: It only happens when using the RDS web client. The native RDP client does not exhibit this behavior. This has only been observed on Windows clients. It hasn't been observed on other client platforms, but testing has been minimal. The client browser does not appear to factor into the bug. It has been observed in Edge, Chrome, and Firefox. The issue is unrelated to the text copied. The same text, from the same application, can produce both outcomes when copied. The application being pasted into seems to be irrelevant. Has anyone else seen this behavior?51Views0likes2Comments