I downloaded wordfile progress91.uew and replaced in this wordfile
Code: Select all
/Function String = "PROCEDURE ^(*^):"
/Function String 1 = "PROCEDURE ^(*^)."
/Function String 2 = "^(FUNCTION *^) RETURN*"
by
Code: Select all
/Function String = "^[ \t]*PROCEDURE[ \t]+([\w-]+)"
/Regexp Type = Perl
Then I created a file with name
test.p and wrote into this file:
Code: Select all
PROCEDURE proc1-xxx
procedure 2proc
PROCEDURE proc3
procedure proc4
Line with
proc3 has tabs instead of spaces. Line with
proc4 has tabs and spaces mixed.
In function list was displayed for this file:
So everything was fine.
Then I thought about file encoding and converted the file from ASCII/ANSI to Unicode and refreshed the function list. This resulted in an empty function list.
Now I replaced in the wordfile
Code: Select all
/Function String = "^[ \t]*PROCEDURE[ \t]+([\w-]+)"
/Regexp Type = Perl
by
Code: Select all
/Function String = "%[ ^t]++PROCEDURE[ ^t]+^([0-9A-Z_^-]+^)"
So instead of using a Perl regular expression finding procedures case-insensitive, an UltraEdit regular expression is used now finding the same strings as the Perl regular expression
^[ \t]*PROCEDURE[ \t]+([\w\-]+) also case-insensitive.
Escaping - within square brackets to explicitly declare this character as literal character for the character set instead of meaning FROM - TO is better although Perl regular expression engine interprets - at beginning or end of character list in square brackets as literal character automatically.
The UltraEdit regular expression function string works for the progress file being encoded in ANSI as well as in Unicode (UTF-16, UTF-8).
So there is indeed a bug in UE v22.10.0.10.
Perl regular expression function strings in a wordfile executed on a Unicode encoded file result in an always empty function list.
Please report this issue to IDM support.
PS: Perl regexp
\w matches not only
0-9A-Za-z_ like
[0-9A-Za-z_] or
[0-9a-z_] or
[0-9A-Z_] in a case-insensitive UltraEdit/Unix/Perl regular expression, but also all other word characters as defined in Unicode table which includes the German characters ÄÖÜäöüß, accented letters, and many, many more characters. I doubt that Progress supports other characters than
0-9A-Za-z_- for a procedure name and therefore it could be better not using
\w in function string to exclude invalid procedure names.
Update on 2015-06-19: I reported this issue also by email to IDM support and received on same day user verification build v22.10.0.1
1 where this problem is fixed already.
Update on 2015-07-06: Public hotfix version v22.10.0.1
2 is released with this issue fixed.