It is currently April 24th, 2024, 3:21 pm

Recreate DecodeCharacterReference in Lua (for Windows-1252)

Tips and Tricks from the Rainmeter Community
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Recreate DecodeCharacterReference in Lua (for Windows-12

Post by Kaelri »

Saiho wrote:Mmmkay, I've read the Reader.lua thread and this one a few times each and I still can't figure out how to use this tool. Do you make a separate .lua file that is used at some point in the skin? Or is this code meant to be copied somewhere in the Reader.lua? Or have I completely missed something?
This isn't a standalone "script" - meaning it doesn't do anything by itself. It's just a set of functions that can be inserted into a script (such as Reader) and used on a string. For example:

Code: Select all

String = '<html>'
String = DecodeCharacterReference(String)
-- Result: String == '<html>'
I'm (slowly) working on an update to Reader that will incorporate this.