Code Monkey home page Code Monkey logo

Comments (8)

orbitalquark avatar orbitalquark commented on September 22, 2024 1

Thanks for the link. It may be possible to use that or something similar.

from textadept.

orbitalquark avatar orbitalquark commented on September 22, 2024

Sorry that you're experiencing this issue :( Your workaround works because I think that your Romanian characters are in the extended ASCII encoding, which Lua can handle when it comes to I/O (as mentioned in your referenced issue). However, when it comes to display (UTF-8), iconv/Textadept does not know how to make the conversion, hence your screenshot.

If you revert your workaround, do things change if you disable that beta UTF-8 option in the Windows Region Settings? Also, please open the command entry (Tools > Command Entry) and type _CHARSET both with the UTF-8 option enabled and then disabled (please restart Textadept after making changes). I'd like to know what the results are. Perhaps we can identify a better workaround.

Thanks for your patience despite not knowing Lua!

from textadept.

georgeraraujo avatar georgeraraujo commented on September 22, 2024

Hi @orbitalquark ,
Would lua-unicode be a possible avenue to overcome this limitation? As per the Wireshark documentation,

Wireshark for Windows uses a modified Lua runtime (lua-unicode) to support Unicode (UTF-8) filesystem paths. This brings consistency with other platforms (for example, Linux and macOS).

from textadept.

ie-rosie avatar ie-rosie commented on September 22, 2024

Hello! Sorry for the late response!

With UTF-8 locale option enabled I have this as a result from _CHARSET CP65001 and without UTF-8 enabled I have CP1250 (using both ASCII and UTF-8 in line 71 of Unserialize buffers function of session.lua module).

I forgot to mention that the version I am using is 12.1.0.0 Stable installed using the Scoop manager.

I also used the _CHARSET command in the Nightly version of the app from 18th October. When I used it without UTF-8 enabled I got CP1250 (using both ASCII and UTF-8 in line 71 of Unserialize buffers function of session.lua module) as a result and with it enabled I got an Initialiation Error when I first opened the app. There are invalid encodings at line 71, where I have the function convert to ASCII. When running the _CHARSET command I got CP65001 as a result. And with UTF-8 changed in line 71 of the module I got CP65001 from _CHARSET.

from textadept.

georgeraraujo avatar georgeraraujo commented on September 22, 2024

Thanks for the link. It may be possible to use that or something similar.

Got it to work (I guess).

Here is こんにちは世界.lua:

print("Hello World")

With lua-5.4.2_Win64_bin.zip from LuaBinaries:

C:\TEMP\lua-5.4.2_Win64_bin>lua54 こんにちは世界.lua
lua54: cannot open ???????.lua: Invalid argument

With lua-unicode:

C:\TEMP\lua-unicode-master-5.4\lua-5.4.6\build64\lua-5.4.6-unicode-win64-vc14>lua54 こんにちは世界.lua
Hello World

from textadept.

orbitalquark avatar orbitalquark commented on September 22, 2024

Hello! Sorry for the late response!

No problem.

With UTF-8 locale option enabled I have this as a result from _CHARSET CP65001 and without UTF-8 enabled I have CP1250 (using both ASCII and UTF-8 in line 71 of Unserialize buffers function of session.lua module).

When you disable the UTF-8 locale option, and without your Unserialize buffers change, do you still get an invalid encoding encoding error message when you try to save a text file with Romanian characters in its filename?

from textadept.

ie-rosie avatar ie-rosie commented on September 22, 2024

Yes, I do. Bellow are the messages. In the first one it changes ț.txt with ?.txt. And the same thing happens with saving a file in a path with Ro characters. Line 194 is from LuaDoc is in core/.buffer.luadoc function in file_io.lua module.

_C:\Users\user\scoop\apps\textadept\current/core/file_io.lua:194: C:\Users\user\Desktop\?.txt: Invalid argument_

_C:\Users\user\scoop\apps\textadept\current/core/file_io.lua:194: C:\Users\user\MEGA\Controlul statistic al calit�?ii\Proiect\test.txt: Invalid argument_

from textadept.

orbitalquark avatar orbitalquark commented on September 22, 2024

Okay, thanks for the extra information. I'll put it on my TODO list, but it's low priority since I've looked into this before with Greek and came up empty (the issue you originally linked to). I'm glad you have a workaround in the meantime, despite how ugly it might be. I do appreciate your report though!

from textadept.

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.