We don't know what that .lua file contains, but I rewrote the RegExp option, here is my new one: RegExp=(?siU)\n(.*),(\d*,?\d*)°C,(\d+) rpm,(\d+)V, (\d*,?\d*)A,(\d*,?\d*)%, (\d*,?\d*)W, (\d*,?\d*)W. Try this one and let me know if this one is working better.
balala wrote:We don't know what that .lua file contains, but I rewrote the RegExp option, here is my new one: RegExp=(?siU)\n(.*),(\d*,?\d*)°C,(\d+) rpm,(\d+)V, (\d*,?\d*)A,(\d*,?\d*)%, (\d*,?\d*)W, (\d*,?\d*)W. Try this one and let me know if this one is working better.
Thanks for your reply, but :
- I don't need 's' flag, it's only for dots ?
- if we put \n at the start it can't parse the last line ?
- + is a good idea, but not solve the issue
- on some variable I really don't want decimal
- I put .* at the end for the case of CRLF
The text file (the .csv) that you are reading with WebParser must be encoded as UTF-8 w/BOM. Nothing else will work. If this is not something you can control, then you need to find out how it is in fact encoded, and use the correct CodePage setting on your parent WebParser measure.
The skin file (the .ini) must be encoded as UTF-16 Little Endian if you are going to use the degree symbol or other characters not in the ASCII character set in it. If not, then ANSI will be ok, but I recommend UTF-16 Little Endian for ALL Rainmeter skin .ini and .inc files. Never encode any skin .ini or .inc file as UTF-8. It won't work.
When I paste the code you posted from your .csv into RainRegExp it works fine, so the regular expression must be ok.
I do suspect some kind of encoding issue somewhere. It's not about the degree ° symbol, that's fine, don't replace it. It's about how either the skin .ini or text .csv files are encoded.
Some more details you didn't ask for on how encoding works...
There are basically three kinds of encoding you will run into:
ANSI - This is really a throwback to an earlier time before Unicode was invented. What it is is the ASCII characters from decimal 0-127, which are standard English characters, numbers and punctuation, combined with the Extended ASCII characters from 128-255, which are some foreign (mostly Western European) characters like acents and graves and umlauts and the like, as well as some box drawing characters and mathematical symbols.
ANSI is treated as ANSI, this old-school vanilla encoding, by programs as long as it only contains characters from the ASCII character set from 0-127. If you put anything above that, from the Extended ASCII character set, then it will be seen as UTF-8 w/o BOM. Oh, and by the way, what characters are represented by the Extended ASCII character set are dependent on what the codepage / locale is on your Windows system. ANSI is bad for sharing now that the entire world is networked. Don't use it.
Rainmeter hates UTF-8 in any .ini or .inc file.
UTF-8 w/BOM - This is a more modern encoding and includes pretty much the entire Unicode character set. There are some limitations as the world of Unicode is huge and getting huger all the time, but pretty much the entire world-wide-web is encoded using it. It gives you most of the power of UTF-16 or UTF-32 encoding, while requiring sending fewer "bytes" over the internet, always a consideration for online stuff.
Again, Rainmeter hates UTF-8 in any .ini or .inc file.
However, by default that is exactly what WebParser is looking for. Since that is what is pretty much always used on the internet, that makes sense. WebParser wants UTF-8 w/BOM, and you will have to force it to accept anything else, by using the CodePage option.
UTF-16 LIttle Endian - This is the most robust form of Unicode in common use, and in fact since Windows 95 is what Windows itself defaults to for all its programs. Since Windows expects UTF-16 Little Endian in programs by default, that is what Rainmeter uses.
Rainmeter really likes UTF-16 Little Endian in .ini and .inc files. Just always use it.
You can in fact use ANSI for skin files, since in a sense ANSI is "no encoding", but be careful. As soon as you put anything other than ASCII in the file, it will be seen as UTF-8, and Rainmeter will hate it.
Hope this helps some.
You do not have the required permissions to view the files attached to this post.