Giter Site home page Giter Site logo

Comments (7)

sihorton avatar sihorton commented on June 29, 2024

The file picker is a bit of a hack to be honest. If I remember correctly it actually boots off a separate windows executable and passes in the parameters including a text file to write to. I have checked index.js and it does read and write in utf8 so my guess is that the executable itself is not writing the text file in utf-8 format.

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Just done some checking, the winfunc.nsi file is in the extension. http://nsis.sourceforge.net/Utf8Converter shows how to convert to utf8. Therefore we would need to update the following code:
FileOpen $5 "$OutPath" w
FileWrite $5 '$SelectedFile'
FileClose $5

To write out a UTF8 string instead (as it does now) an ascii string.

from appjs-deskshell.

lvbeck avatar lvbeck commented on June 29, 2024

thanks a lot, I updated the winfunc.nsi script as follows and recompiled the winfunc.exe, it works now:

!include "Utf8Converter.nsh"
Var /GLOBAL SelectedFileUTF8    

${AnsiToUtf8} $SelectedFile $SelectedFileUTF8
FileOpen $5 "$OutPath" w
FileWrite $5 '$SelectedFileUTF8'
FileClose $5

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Great thanks a lot. Would you like to make the same change and submit a pull request for it? That way you get the credit you deserve for the fix

from appjs-deskshell.

lvbeck avatar lvbeck commented on June 29, 2024

hi @sihorton, I can not find the deskshell-win-func module in the master branch anymore, is it deprecated?

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Ah I am sorry I moved it. Not by laptop right now will find correct place for you this afternoon.

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

I moved it to the deskshell-showcase repository. My idea was to move anything custom or extra to that repository and then let people choose if they want to use it or not, so the files are now located:

https://github.com/sihorton/deskshell-showcase/tree/master/win-native-func/node_modules/deskshell-win-func

Thanks.

from appjs-deskshell.

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.