It is currently April 25th, 2024, 9:01 am

And Lua again with its Unicode limitations

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

And Lua again with its Unicode limitations

Post by ~Faradey~ »

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: 2872
Joined: April 17th, 2009, 12:18 pm

Re: And Lua again with its Unicode limitations

Post by poiru »

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

Re: And Lua again with its Unicode limitations

Post by ~Faradey~ »

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

Re: And Lua again with its Unicode limitations

Post by Brian »

(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: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: And Lua again with its Unicode limitations

Post by ~Faradey~ »

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: 1721
Joined: July 25th, 2009, 4:47 am

Re: And Lua again with its Unicode limitations

Post by Kaelri »

~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

Post by megajustinmon »

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: 1721
Joined: July 25th, 2009, 4:47 am

Re: And Lua again with its Unicode limitations

Post by Kaelri »

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.