Commit b8a2a70
Fix fallout from SimpleGraphic upgrade with wider Unicode support (#372)
* fix: enable Unicode separators and caret motions
As the runtime is going to support Unicode installation locations and
build directories, some UTF-8 text is going to reach the Lua side of
the project. This includes the script path, the user path, any paths
yielded from file searches and also imported character names from
accounts.
Care needs to be taken in many places where string operations are
performed as no longer does a byte necessarily correspond to a single
character and anything that truncates, reverses or otherwise slices
strings could need an audit.
This change fixes cursor movement in `EditControl`s with the arrow keys
as those historically used string matching and byte offsets. It also
ensures that the use of arbitrary Unicode codepoints as decimal and
thousands separators works correctly as the previous code used unaware
reversing and slicing.
* fix: turn update paths relative for wide installs
The updater is a fixed piece of older code that uses a Lua runtime that
only handles paths that are representable in the user's text codepage.
As the software may be installed in a location that cannot be expressed
in that way, to mitigate the problem we turn all the paths in the
update op-files into relative paths. That way as long as we never use
exotic codepoints in our own paths it should be able to apply them
cleanly and restart Path of Building afterward with a relative path.
The updater executable can ironically enough not be updated at all with
the related type of runtime hacks we introduced in SimpleGraphic as the
updater deadlocks in updating itself. We have to work around its
shortcomings in how we produce the op-files and possibly the update
application script that runs under that limited runtime.
* Add luautf8 to Dockerfile
---------
Co-authored-by: Wires77 <Wires77@users.noreply.github.com>1 parent df3773d commit b8a2a70
File tree
4 files changed
+19
-31
lines changed- src
- Classes
- Modules
4 files changed
+19
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 545 | + | |
| 546 | + | |
554 | 547 | | |
555 | | - | |
| 548 | + | |
556 | 549 | | |
557 | 550 | | |
558 | 551 | | |
| |||
562 | 555 | | |
563 | 556 | | |
564 | 557 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
576 | 561 | | |
577 | | - | |
| 562 | + | |
578 | 563 | | |
579 | 564 | | |
580 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
726 | | - | |
| 727 | + | |
| 728 | + | |
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
731 | | - | |
| 733 | + | |
732 | 734 | | |
733 | | - | |
| 735 | + | |
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
737 | | - | |
| 739 | + | |
738 | 740 | | |
739 | | - | |
| 741 | + | |
740 | 742 | | |
741 | 743 | | |
742 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments