Page 2 of 2
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 13 Dec 2014 20:53
by klownboy
Nice work totmad1. It's good to know that Irfanview doesn't have a problem with paperfolders being encoded UTF-16LE as long as you are making the image selection from the listing in the text files. It's when you use the Irfanview command line switch "/filelist=blablabla" to point to the a paperfolder (encoded to UTF-16LE) that is a problem for Irfanview.
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 17 Dec 2014 19:26
by totmad1
i have been doing further tests and have found an inconsistent problem with "!=".
it may just be my pc so i have found a workaround.
replace "
Code: Select all
if($ext !="jpg" OR $ext !="bmp" OR $ext !="png"){$image_list = "";}
with
Code: Select all
if(($ext =="jpg" OR $ext =="bmp" OR $ext =="png")==0) {$image_list = "";}
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 17 Dec 2014 19:47
by klownboy
Hi totmad1, have you tried using "LikeI" or in this case, "UnLikeI"? Something like this (no pun intended)...untested...
Code: Select all
if ("|jpg|bmp|png|" UnLikeI *|$ext|*) {$image = ""; }
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 17 Dec 2014 19:55
by highend
Did I mention that I like regexmatches even for comparisons? xD
Code: Select all
if !(regexmatches($ext, "(jpg|bmp|png)")) { $image = ""; }
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 17 Dec 2014 20:02
by klownboy
No highend, aka MrRegEx, I don't believe you've ever mentioned that.
highend wrote:Did I mention that I like regexmatches even for comparisons? xD
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 19 Dec 2014 19:29
by totmad1
Hi klownboy & highend
Am really happy to be introduced to your two methods , have made special note.
have to even admit to understanding MrRegEx 's without lookup in help file. must be starting to sink in.
one question for you Ken i haven't been able to find in my documentation your use of " *|"
I've tested timings and found other than a couple of anomalies no speed differences in all three methods.
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 19 Dec 2014 19:57
by highend
one question for you Ken i haven't been able to find in my documentation your use of " *|"
* is the wildcard.
"|jpg|bmp|png|" UnLikeI *|$ext|*
He uses the "*|" and "|*" it to make sure that a match is exact and that it can be anywhere inside the pattern "|jpg|bmp|png|".
I've used this kind of comparison in the past but it's not easy to read and error prone (just forget one | and you can get weird results).
Re: UTF-16LE encoded PaperFolders and Irfanview
Posted: 20 Dec 2014 14:57
by totmad1
A BIG THANKS to you highend really appreciate your time & trouble.
I had thought that the * was for the wildcard in this case but was confused with the format.
I've done a further search using grep and found only two other scripts using this format but contained in quotes.
Again real appreciation and thanks.
