Commit ef02e1c
committed
GUACAMOLE-2153: Fix GUAC_*_UTF16 on big-endian machine
Since UTF-16 works with 16-bit values it has a byte order and that byte
order is not well defined. There is a convention to use U+FEFF as first
character which allows determining the endianess but it's commonly not
present and doesn't seem to fit into the current code. The most common
thing is to assume little-endian which is what I did here and is already
implied by the test suite. If supporting both big- and little-endian
UTF-16 is wanted one could create _UTF16LE and _UTF16BE variations of
the functions.1 parent c4d70e0 commit ef02e1c
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | | - | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| |||
0 commit comments