UTF-16LE encoded PaperFolders and Irfanview
-
klownboy
- Posts: 4452
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: UTF-16LE encoded PaperFolders and Irfanview
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
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 "
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 = "";}Code: Select all
if(($ext =="jpg" OR $ext =="bmp" OR $ext =="png")==0) {$image_list = "";}totmad1 (totally mad one)
-
klownboy
- Posts: 4452
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: UTF-16LE encoded PaperFolders and Irfanview
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
Did I mention that I like regexmatches even for comparisons? xD
Code: Select all
if !(regexmatches($ext, "(jpg|bmp|png)")) { $image = ""; }One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4452
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.7462 at 100% 2560x1440
Re: UTF-16LE encoded PaperFolders and Irfanview
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
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.
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.
totmad1 (totally mad one)
Re: UTF-16LE encoded PaperFolders and Irfanview
* is the wildcard.one question for you Ken i haven't been able to find in my documentation your use of " *|"
"|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).
One of my scripts helped you out? Please donate via Paypal
Re: UTF-16LE encoded PaperFolders and Irfanview
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.

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.
totmad1 (totally mad one)
XYplorer Beta Club