picnic icon indicating copy to clipboard operation
picnic copied to clipboard

Characters don't work on Windows

Open garfieldnate opened this issue 4 years ago • 6 comments

It appears that the unicode characters are not generated or recognized correctly on Windows.

I've opened a PR to add a GitHub action to build on Windows, Linux and Mac; the Windows build always fails, though, because the tables look like this:

    ?          compressed           ?          uncompressed          
        ?????????????????????????????????????????????????????????????????
APK      ? old       ? new       ? diff  ? old       ? new       ? diff   
???????????????????????????????????????????????????????????????????????????
    dex ? 664.8 KiB ? 664.8 KiB ? -25 B ?   1.5 MiB ?   1.5 MiB ? -112 B 
    arsc ? 201.7 KiB ? 201.7 KiB ?   0 B ? 201.6 KiB ? 201.6 KiB ?    0 B 
manifest ?   1.4 KiB ?   1.4 KiB ?   0 B ?   4.2 KiB ?   4.2 KiB ?    0 B 
    res ? 418.2 KiB ? 418.2 KiB ? -14 B ? 488.3 KiB ? 488.3 KiB ?    0 B 
    asset ?       0 B ?       0 B ?   0 B ?       0 B ?       0 B ?    0 B 
    other ?  37.1 KiB ?  37.1 KiB ?   0 B ?  36.3 KiB ?  36.3 KiB ?    0 B 
???????????????????????????????????????????????????????????????????????????

See build results here.

garfieldnate avatar Apr 13 '21 10:04 garfieldnate

All fixed in my PR ;) If you could let me know if you are able to merge and release it soonish that would be super helpful; otherwise I'll need to fork it to release the project I've been working on (or, of course, use a different table renderer... but I like this one:) ).

garfieldnate avatar Apr 14 '21 19:04 garfieldnate

I just realized that the issue is actually with the compilation of the test files; my test files also use the special non-ASCII characters, and setting the encoding correctly makes the tests pass on Windows. So I'm not blocked in any way by this ticket. I hope that it can still be a useful contribution for you. Thanks again for the amazing project! :)

garfieldnate avatar Apr 15 '21 15:04 garfieldnate

Any updates to this? I've recently ran into this too.

jakepurple13 avatar Dec 08 '22 12:12 jakepurple13

@jakepurple13 If you're running into this while testing your own project, I would just set compileTestJava.options.encoding = "UTF-8". This will prevent the issue from affecting your tests, and you won't be dependent on picnic being updated/released.

garfieldnate avatar Dec 09 '22 14:12 garfieldnate

I'm trying to make a gradle plugin using this. And I'm also using gradle kts and couldn't find a way to set the compileTestJava one.

Edit: I think I found a way to change it

tasks.withType<JavaCompile>().let {
    it["compileJava"].options.encoding = "UTF-8"
    it["compileTestJava"].options.encoding = "UTF-8"
}

But it's still not working.

jakepurple13 avatar Dec 09 '22 14:12 jakepurple13

I'm sorry, I have no experience writing gradle plugins 🤷 . All my project required was this one simple line: https://github.com/garfieldnate/Weka_AnalogicalModeling/blob/master/build.gradle#L12

garfieldnate avatar Dec 09 '22 15:12 garfieldnate