It is currently October 19th, 2019, 7:22 pm

And Lua again with its Unicode limitations

Report bugs with the Rainmeter application and suggest features.
User avatar
~Faradey~
Posts: 367
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

And Lua again with its Unicode limitations

~Faradey~ » October 6th, 2012, 11:11 am

Ok, Hi again)
I thought, when lua can't understand Unicode characters it can at least load .lua files in case path or skin's name has Unicode characters in it, but it can't...as i see in log:
Script: cannot open C:\Users\%UserName%\Documents\Rainmeter\Skins\TestSkin\?-†???\lua1.lua: Invalid argument

I understand that making lua to understand unicade is tough task, but at least load it it should can, when path unicode formatted.

I personally don't have any unicode characters on my end, but considering that i put so much efforts on making my suite understanding (supporting) unicode (pretty much everywhere where it should) and having an Chinese language support i stumble on this problem...what if user name will be Unicode formated...so i did testing and created skin with unicode name. Results: skin loads and works as it should, lua doesn't...

this is how lua measure in skin looks like:

Code: Select all

[LuaMeasure]
Measure=Script
ScriptFile="#CURRENTPATH#lua1.lua"
UpdateDivider=-1
this is lua itself

Code: Select all

PROPERTIES =
{

}

function Initialize() 
	print("I'm INITIALIZING!")
end -- function Initialize

function Update()
	print("I RAN!")
end -- function Update

Or am I doing something wrong?
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

Re: And Lua again with its Unicode limitations

poiru » October 6th, 2012, 6:43 pm

Fixed for the beta tomorrow. Thanks for reporting! :)
User avatar
~Faradey~
Posts: 367
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: And Lua again with its Unicode limitations

~Faradey~ » October 7th, 2012, 9:17 am

awesome!
Thank you sir. :)
User avatar
Brian
Developer
Posts: 1910
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: And Lua again with its Unicode limitations

Brian » October 7th, 2012, 5:32 pm

(A little off topic)

The use of the "PROPERTIES" table has been deprecated and might be removed in the future, so it is a good idea to update your code and remove the "PROPERTIES" table.

http://rainmeter.net/cms/LuaScripting_beta

-Brian
User avatar
~Faradey~
Posts: 367
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: And Lua again with its Unicode limitations

~Faradey~ » October 12th, 2012, 8:46 pm

Brian wrote:(A little off topic)

The use of the "PROPERTIES" table has been deprecated and might be removed in the future, so it is a good idea to update your code and remove the "PROPERTIES" table.

http://rainmeter.net/cms/LuaScripting_beta

-Brian
OK! Thank you.
I, actually knew that PROPERTIES has been deprecated but i thought if i leave it blank it would not affect on script.
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: And Lua again with its Unicode limitations

Kaelri » October 12th, 2012, 8:50 pm

~Faradey~ wrote:I, actually knew that PROPERTIES has been deprecated but i thought if i leave it blank it would not affect on script.
That's correct. :)
megajustinmon
Posts: 1
Joined: October 15th, 2012, 11:00 pm

Re: And Lua again with its Unicode limitations

megajustinmon » October 15th, 2012, 11:04 pm

I need help. I believe this guy used lua with his launcher app.

When i type "Google Chrome" into the run launcher. It launches it fine.

But i cant launch any of my games or skype or folders with the typing feature. Anyone know the right typing commands?
User avatar
Kaelri
Developer
Posts: 1739
Joined: July 25th, 2009, 4:47 am

Re: And Lua again with its Unicode limitations

Kaelri » October 21st, 2012, 1:58 pm

megajustinmon wrote:I need help. I believe this guy used lua with his launcher app.

When i type "Google Chrome" into the run launcher. It launches it fine.

But i cant launch any of my games or skype or folders with the typing feature. Anyone know the right typing commands?
If you can provide a link to the skin you're talking about, it would be much easier to help. In general, unless the skin author has provided some kind of "shortcut" feature, you'll need to specify the complete path (e.g. C:\Program Files\Skype\Skype.exe) in order to launch a program.