Commit 9eb5ba6
Assume clipboard text from PoB is UTF-8 or ASCII
The Copy function previously put the copied text from Lua verbatim on the clipboard as `CF_TEXT` which if not annotated with a locale is assumed to be in the current "input locale".
This commit changes it to instead assume that it's either in UTF-8 (or ASCII, which is a subset of UTF-8), transcoding it to UTF-16LE for `CF_UNICODETEXT`.
This enables the ability for the Lua side to copy out UTF-8 text which it may have obtained from an external source like trade or another API.
A brief audit of the current Lua source code does not reveal any call site that should contain text in the local codepage as build XML is supposed to be UTF-8 and no file paths seem to be copied.1 parent 4b386cc commit 9eb5ba6
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
| 389 | + | |
389 | 390 | | |
390 | | - | |
391 | | - | |
| 391 | + | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | | - | |
| 396 | + | |
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
| |||
0 commit comments