-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: UTF-8 file path support for
lean
on Windows
* fix msys2 windows build so the windows apps support utf-8 file paths. * use windres to compile default-manifest.o * windres is in binutils. * stop modifying default-manifest.o * copy to stage0 * fix semicolon joining of lists in add_custom_target * undo changes to stage0 as per CR feedback. * fix makefile * fix: revert cmakelists.txt COMMAND_EXPAND_LISTS change * fix: msys2 dependencies * add unit test for decoding UTF-8 chars to prove "lean.exe" can read utf-8 encoded files where utf-8 is also used in the file name. * fix: utf-8 test by using windows-2022 * fix: do we really need cmake 3.11 or will 3.10 do? * nope, really does require cmake 11.
- Loading branch information
1 parent
6b1bed5
commit ad7c5b2
Showing
7 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,8 @@ settings.json | |
CMakeSettings.json | ||
CppProperties.json | ||
result | ||
fwIn.txt | ||
fwOut.txt | ||
wdErr.txt | ||
wdIn.txt | ||
wdOut.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<security> | ||
<requestedPrivileges> | ||
<requestedExecutionLevel level="asInvoker"></requestedExecutionLevel> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
<application> | ||
<windowsSettings> | ||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> | ||
</windowsSettings> | ||
</application> | ||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS> | ||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS> | ||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS> | ||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS> | ||
</application> | ||
</compatibility> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "app.manifest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def check_eq {α} [BEq α] [Repr α] (tag : String) (expected actual : α) : IO Unit := | ||
unless (expected == actual) do | ||
throw $ IO.userError $ | ||
s!"assertion failure \"{tag}\":\n expected: {repr expected}\n actual: {repr actual}" | ||
|
||
def DecodeUTF8: IO Unit := do | ||
let cs := String.toList "Hello, 英語!" | ||
let ns := cs.map Char.toNat | ||
IO.println cs | ||
IO.println ns | ||
check_eq "utf-8 chars" [72, 101, 108, 108, 111, 44, 32, 33521, 35486, 33] ns | ||
|
||
#eval DecodeUTF8 |