Menu

#1 Mixed case dictionary tags cause loss

open
nobody
None
5
2003-09-12
2003-09-12
Anonymous
No

If you use "datasource" or "dataSource", and aren't
consistent, the Lowercase algorithm truncates the hash
tree when converting to lowercase.

The attached patch changes the node renaming to a full
move operation (for lack of better explanation). It
moves over any nodes from the mixed case dictionary tag
to the lowercase version.

Russell Adams <rladams@kelsey-seybold.com>

--- Lowercase.pm.old 2000-04-26 15:01:48.000000000 -0500
+++ Lowercase.pm 2003-09-12 12:04:19.000000000 -0500
@@ -41,7 +41,10 @@
}
}
if($dict =~ /[A-Z]/) {
- $$config->{lc($dict)} =
$$config->{$dict};
+ foreach my $tag (keys %
{$$config->{$dict}}) {
+
$$config->{lc($dict)}->{$tag} = $$config->{$dict}->{$tag};
+ delete
$$config->{$dict}->{$tag};
+ }
delete $$config->{$dict};
}
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.