It is currently May 3rd, 2024, 4:26 pm

parsing a 64 bit text file with webparser

Get help with creating, editing & fixing problems with skins
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: parsing a 64 bit text file with webparser

Post by Seahorse »

Would this be of any use?
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: parsing a 64 bit text file with webparser

Post by jsmorley »

spx has added support for UTF-16LE in WebParser. You will need to use CodePage=1200 on the WebParser measure.

Bob, you can get an early release of the beta here: http://dl.dropbox.com/u/4991063/Rainmeter/Build/Rainmeter-2.1-r840-beta.exe to test. Let me know if it fixes the issue.

I'm not sure those Adobe files are being saved as technically proper UTF-16 files though. In theory RainRegExp should already support that file format as long as the files contain a proper BOM (Bye Order Mark) http://en.wikipedia.org/wiki/Byte_Order_Mark in the first characters of the file. That second text file you sent does not load in RainRegExp however, and that concerns me. I will look further into it. In the meantime, you can copy and paste from that file opened in Notepad++ into RainRegExp and that method will work fine.

Edit: The FF FE "BOM" in that file seems to be right for UTF-16LE, so I'm not sure what it going on with RainRegExp. It seems to be seeing the NULL (00) after the first character, a "<", in the file as an EOF. I will investigate, but would like to get feedback Bob, on how it works for you in WebParser.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: parsing a UTF-16 text file with webparser

Post by jsmorley »

As far as I can tell, the addition spx did does in fact allow WebParser to read that file properly. I did a little test skin and it seems to work fine as long as you add CodePage=1200 to the measure.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureUTF]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=file://C:\DN\zipstuff\zipstuff\show2.txt
RegExp="(?siU)<name>(.*)</name>"
CodePage=1200

[MeasureName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasureUTF]
StringIndex=1

[MeterName]
Meter=String
MeasureName=MeasureName
FontSize=12
FontColor=255,255,255,255
X=0
Y=2R
Text=Name: %1
User avatar
bobgrosh
Posts: 134
Joined: May 1st, 2011, 10:33 pm

Re: parsing a 64 bit text file with webparser

Post by bobgrosh »

WOW!
Once again, I woke up this morning and my computer had the solution.

I already had Codepage=1200 in the measure. (I had tried a dozen other numbers, but left 1200 in there as it seemed to be the right one acording to what I read on the web.

So, after reading your last post. I shut down RM and upgraded from the beta release I installed a week or so ago to 2.1 r840.

When Rainmeter restarted, there was all my data from the XML file displayed in my skin perfectly.

IT WORKS!

I can't tell you how grateful I am for that link.

BTW,
In the [Rainmeter] Section I added AppVersion=2001840
When I refresh I get prompted to upgrade to 2.1.840
"About Rainmeter" says I have 2.1.0 r840

So, am I unable to have this skin alert me that it only works on r840 and not r822 ?

I guess I am a little confused about how to form the AppVersion number.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: parsing a 64 bit text file with webparser

Post by jsmorley »

bobgrosh wrote:WOW!
Once again, I woke up this morning and my computer had the solution.

I already had Codepage=1200 in the measure. (I had tried a dozen other numbers, but left 1200 in there as it seemed to be the right one acording to what I read on the web.

So, after reading your last post. I shut down RM and upgraded from the beta release I installed a week or so ago to 2.1 r840.

When Rainmeter restarted, there was all my data from the XML file displayed in my skin perfectly.

IT WORKS!

I can't tell you how grateful I am for that link.

BTW,
In the [Rainmeter] Section I added AppVersion=2001840
When I refresh I get prompted to upgrade to 2.1.840
"About Rainmeter" says I have 2.1.0 r840

So, am I unable to have this skin alert me that it only works on r840 and not r822 ?

I guess I am a little confused about how to form the AppVersion number.
To be honest I would not use AppVersion in a skin at all. I would use the functionality in .rmskin to force a particular version.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: parsing a 64 bit text file with webparser

Post by poiru »

bobgrosh wrote:So, am I unable to have this skin alert me that it only works on r840 and not r822 ?

I guess I am a little confused about how to form the AppVersion number.
You can't specify the revision with AppVersion, unfortunately. If you distribute your skin through a .rmskin, take a look at the MinRainmeterVer= option for Rainstaller.cfg.
User avatar
bobgrosh
Posts: 134
Joined: May 1st, 2011, 10:33 pm

Re: parsing a 64 bit text file with webparser

Post by bobgrosh »

OMG!

I just remembered why I was writing this skin.

My intent was to read it, display some of it's values, and then change some of the values and write the changes back to the file.

If the file had been a plain old txt file, I had an plan for how I would do it.

Now, I am not so sure. For one thing, I haven't even checked to see if I will break Flash Media Encoder if I alter it's xml file by converting it to plain text.

Well, Here goes nothing. Wish me luck.

PS.
I am Old School.
Like you said, a text file is a text file.
Information about a files format and other properties, needs to be in an extended directory entry, not the file itself.

Bill, What have you done to my OS? Sigh!