View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001228 | Far Manager | Macro | public | 2009-12-28 20:04 | 2010-01-02 11:07 |
Reporter | farman | Assigned To | vskirdin | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86 | OS | Windows | OS Version | XP SP3 |
Product Version | 2.0 | ||||
Fixed in Version | 2.0 | ||||
Summary | 0001228: Macro Problem (wrong results in 'Index') | ||||
Description | index() is case-insensitive. There should be a parameter added (case sensitive/insensitive) to index() and similar functions to get right results. The encyclopedia should be updated. -------------------------------------------- The result is a part of a macro "cleaning filenames from unwanted chars". Result (look at the macro) isn't as expected: %sNew should be like %sRpl. sIst=ÃÁÂÀÅÉÊËÈÍÎÏÓÔÒÕÚÛÙâàåáãçéêëèïîìíñõôòóúûùÿ sRpl=AÁÂÀAEÊËÈIIIOOOOUUUâàaáaçéêeèiiiinoooouuuy sNew=AÁÂÀAEÊËÈIIIOOOOUUUÂÀAÁAçEÊËÈIIiInOOOOUUUy sIst=âàåáãçéêëèïîìíñõôòóúûùÿÃÁÂÀÅÉÊËÈÍÎÏÓÔÒÕÚÛÙ sRpl=âàaáaçéêeèiiiinoooouuuyAÁÂÀAEÊËÈIIIOOOOUUU sNew=âàaáaçéêeèiiiinoooouuuyaáâàaéêeèiiioooouuu | ||||
Steps To Reproduce | Example Macro: -------------------------------------------- %sIst = "ÃÁÂÀÅÉÊËÈÍÎÏÓÔÒÕÚÛÙâàåáãçéêëèïîìíñõôòóúûùÿ"; %sRpl = "AÁÂÀAEÊËÈIIIOOOOUUUâàaáaçéêeèiiiinoooouuuy"; %sNew = ""; %j = 0; $WHILE ( %j < len(%sIst) ) %c = substr(%sIst, %j, 1); %k = Index( %sIst, %c); %cNew = substr(%sRpl, %k, 1); %j = %j + 1; %sNew = %sNew + %cNew; $END msgbox ( "Result","sIst=" + %sIst + "\n" + "sRpl=" + %sRpl + "\n" + "\n" + "sNew=" + %sNew ) | ||||
Additional Information | reported/discussed in http://forum.farmanager.com/viewtopic.php?f=36&t=4891 | ||||
Tags | No tags attached. | ||||
Build | 1303 | ||||
|
will be changed following functions: index() ==> S=index(S1,S2[,Mode]) rindex() ==> S=rindex(S1,S2[,Mode]) What other functions? "replace()"? |
|
1. Yes. All string "search" functions. -- TestMacro -- %s = "Ââ"; %sNew = replace(%s,"â","x"); msgbox ( "Result","s=" + %s + "\n" + "sNew=" + %sNew ) 2. There seem to be many functions (not only macros): e.g. Panels - QuickFind with Alt.... -- Test with 2 filepairs -- "âÂ1.txt" "Ââ2.txt" "cC1.txt" "Cc2.txt" If you try QuickFind you will always get the 1. file. It's not really necessary to change QuickFind (because we get no errors) but it would look more logical and offer more possibilitys. 3. Have a nice new year. :) |
|
> 2. There seem to be many functions (not only macros): must create a new incident |
|
build 1303 |
|
Works fine now. Thanx very much. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-12-28 20:04 | farman | New Issue | |
2009-12-29 06:50 | vskirdin | Status | new => assigned |
2009-12-29 06:50 | vskirdin | Assigned To | => vskirdin |
2009-12-29 06:53 | vskirdin | Note Added: 0004737 | |
2009-12-29 08:38 | farman | Note Added: 0004738 | |
2009-12-29 09:04 | vskirdin | Note Added: 0004739 | |
2009-12-29 10:34 | vskirdin | Note Added: 0004740 | |
2009-12-29 10:34 | vskirdin | Status | assigned => feedback |
2009-12-30 12:24 | farman | Note Added: 0004744 | |
2010-01-02 11:07 | vskirdin | Build | => 1303 |
2010-01-02 11:07 | vskirdin | Status | feedback => closed |
2010-01-02 11:07 | vskirdin | Fixed in Version | => 2.0 |
2010-01-02 11:07 | vskirdin | Resolution | open => fixed |