It is currently April 28th, 2024, 10:59 am

Parsing a file saved as Unicode

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

Parsing a file saved as Unicode

Post by ~Faradey~ »

Before new 2.2 beta ver. I haven't had problems in using code page, now i have ;(
The thing is, that i need to parse a local file with WebParser and this file was created in Notepad and by choosing "Unicode" encoding, and everything worked fine using "1200" as code page in WebParser/ but now it returns "Matching error! (-10)"

Look at the test code:

Code: Select all

[mURLFeed3z]
Measure=Plugin
Plugin=WebParser.dll
Url=file://#CURRENTPATH#TestFile.inc
RegExp="(?siU)item1=(.*)item2"
CodePage=1200
UpdateRate=2000
StringIndex=1
i've tried a lot of others possible codes, but with no luck :( Please help

and here is a file "TestFile.inc"
http://www.mediafire.com/?36omziq86k41yen


2.2.0 beta r995 64-bit (Oct 9 2011)
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Parsing a file saved as Unicode

Post by jsmorley »

Yes, it does seem to suddenly have a problem with UCS-2 Little Endian and CodePage=1200.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Parsing a file saved as Unicode

Post by ~Faradey~ »

jsmorley,
as i can guess changing code page will not solve this problem?
i think it is something about ...
WebParser: Fixed a RegExp failure if the data contained embedded NULL characters.
or else, i don't know, i hope you will fix that as soon as it possible, good luck :)
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Parsing a file saved as Unicode

Post by poiru »

~Faradey~ wrote: or else, i don't know, i hope you will fix that as soon as it possible, good luck :)
Yes, that was indeed the cause. Here is a fixed version of WebParser: http://poiru.net/webparser2.zip
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Parsing a file saved as Unicode

Post by ~Faradey~ »

poiru wrote:Here is a fixed version of WebParser:
Wow, that was very fast :thumbup:
confirmed! all works as usual. Thank you :)