Giter Site home page Giter Site logo

Comments (11)

Difegue avatar Difegue commented on May 13, 2024

Can't believe I forgot to test those again.
The advantage of using a dumb .bat script means fixing this remotely is easy, though.

Try adding chcp 65001 as the first line of the .bat file. If it doesn't work, chcp 932.
I didn't want to force unicode codepage as it's a bit weird on windows, but I guess we'll have to.

from lanraragi.

 avatar commented on May 13, 2024

Tried both. Dosen't fix the error.
Adding chcp 65001 did fix display of unicode characters inside the prompt however.

from lanraragi.

Difegue avatar Difegue commented on May 13, 2024

Right. After a bit more searching, it turns out the problem doesn't lie in the windows commandline, but in perl not being aware we're using a windows codepage.

The above below commit fixed the issue on my dev machine (was able to upload/read/delete an archive with Unicode filenames without trouble), I'll update the Windows .zip on the release page to include the hotfix.

from lanraragi.

 avatar commented on May 13, 2024

Didn't fix the error for me.
[2018-05-03 01:39:39] [Shinobu] [info] Done!
[2018-05-03 01:39:39] [Shinobu] [warn] Deleting ID 51050a66fd9170c94d3fbc9c4f60da8e6715b482 - File D:/Portable/LANraragi/lanraragi/content/(COMIC1��13) [�f�B�G�b�v�H�[ (� �é���[��)] �y�[�p�[�o�b�N�E���C�^�[ACT.00 (�á�¦���¢�������ç���©�½).zip cannot be found.
[2018-05-03 01:39:39] [Shinobu] [info] Archive count (1) has changed since last cached value (0) OR rebuild has been forced (flag value = 0), rebuilding...
[2018-05-03 01:39:34] [Auto-Tagger] [info] Executing enabled plugins on archive with id 51050a66fd9170c94d3fbc9c4f60da8e6715b482.
[2018-05-03 01:39:34] [Shinobu] [info] Adding new file D:/Portable/LANraragi/lanraragi/content/(COMIC1��13) [�f�B�G�b�v�H�[ (� �é���[��)] �y�[�p�[�o�b�N�E���C�^�[ACT.00 (�á�¦���¢�������ç���©�½).zip with ID 51050a66fd9170c94d3fbc9c4f60da8e6715b482

from lanraragi.

Difegue avatar Difegue commented on May 13, 2024

well shit - maybe I need to specifically scan for the used codepage at runtime and use that instead of the catch-all 65001. What a pain.

Going to need some basic diagnostic info:

  • Windows version (I'm testing on 10 which I suspect is much better at handling Unicode)
  • Default codepage (you can get that by typing chcp in a command line )

from lanraragi.

 avatar commented on May 13, 2024

Windows 10 1709
chcp 932

from lanraragi.

Difegue avatar Difegue commented on May 13, 2024

Right, 932 is Microsoft's version of SHIFT-JIS.
I recall it handling filepaths differently from the others, so that probably explains it.

You can try changing line 8 of lanraragi/lib/LANraragi.pm on your own from cp65001 to cp932 and see if it fixes the problem. If my diagnostic is correct, it should.

I'll add in codepage detection tomorrow - luckily there's a CPAN package for that.

from lanraragi.

 avatar commented on May 13, 2024

Did not fix the issue.

from lanraragi.

Difegue avatar Difegue commented on May 13, 2024

¯\_(ツ)_/¯
I'm officially out of ideas.
I'll switch my dev machine to 932 to do some detailed testing, but for now I guess you'll have to rename your files or switch locales.

from lanraragi.

 avatar commented on May 13, 2024

Eh, no worries. I still got my vagrant install until this starts working.

from lanraragi.

Difegue avatar Difegue commented on May 13, 2024

I tried a few things on a Shift-JIS Win10 VM, but there's no real easy way to get out of this one that I know of.

(On the bright side, I did port the QuickStarter to a Powershell script while doing my testing, so that'll probably be in 0.5.3. Doesn't fix the problem here, though.)

Our internal Unicode handling is pretty much rock-solid as of now, but the real issue mostly lies in the Windows console itself and how Windows Perl ports have trouble dealing with it.

It mostly works with ASCII locales, but Shift-JIS and a few others introduce changes to the console that throws us off path.
There are seemingly ways* to deal with codepages, but I'm not going to bloat the main codebase with edge cases for them, as the native Windows version still remains secondary** and there's multiple ways to run LRR on those Windows systems, like Vagrant/Docker.

* This would probably only fix the issue for cp932, other weirdass codepages like cyrillic would still glitch up.
** As a matter of fact, Mojolicious dropped Windows support as of last month but it still works so w/e

from lanraragi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.