Comments (8)
Thanks for the link. It may be possible to use that or something similar.
from textadept.
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.
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.
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.
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.
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.
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.
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)
- `events.connect(events.LEXER_LOADED,...)` strange behaviour in nightly HOT 2
- Cannot load built-in modules on macOS HOT 2
- how to make current line number have a different color? HOT 5
- ui.print_silent_to() doesn't update the Tab label HOT 1
- lua interpeter scope not working properly HOT 7
- Going for new style snippets, I can't makethem work as per documentation HOT 2
- Problem expanding snippet with $0 HOT 4
- HTML doc files missing from source archive HOT 6
- Feature Request: Help in curses mode should show md files HOT 4
- Textadept Windows support history HOT 1
- lfs.walk() hangs when passed a non-existent directory path. HOT 1
- Building nightly failed on target `termkey-populate` HOT 4
- Stack overflow error with Linux release v12.4 HOT 4
- Closing a non-active buffer via the tab button switches the active buffer when it shouldn't. HOT 2
- Textadept freezes on large csv file HOT 14
- open normal html file and it gives error HOT 6
- not able to open this file HOT 1
- Buggy text in terminal version when maximizing HOT 2
- Suggestion for Find & Replace HOT 4
- 12.4 build failure: invalid use of incomplete typedef ‘WINDOW’ {aka ‘struct _win_st’} HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textadept.