From dc21854c3bc2f487438e69539ea2832d1b32ef52 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Fri, 10 Apr 2015 21:37:57 +0200 Subject: [PATCH] #852 Ignore case doesn't works when using Search in AS with russian text fixed --- build_common.xml | 2 +- src/com/jpexs/decompiler/flash/gui/MainPanel.java | 6 +++--- src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java | 4 ++-- src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build_common.xml b/build_common.xml index 8f4a717ae..f267494e3 100644 --- a/build_common.xml +++ b/build_common.xml @@ -474,7 +474,7 @@ - + diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index cdb2133c2..8f72a3130 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -1352,9 +1352,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } Pattern pat; if (regexp) { - pat = Pattern.compile(txt, ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + pat = Pattern.compile(txt, ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0); } else { - pat = Pattern.compile(Pattern.quote(txt), ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + pat = Pattern.compile(Pattern.quote(txt), ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0); } List textTags = new ArrayList<>(); for (Tag tag : swf.tags) { @@ -2356,7 +2356,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec if (swf == null) { swf = swfs.get(0).get(0); } - + updateUi(swf); } } else { diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 7e627f909..f71d92876 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -180,8 +180,8 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se ClassesListTreeModel clModel = (ClassesListTreeModel) scriptsNode; List allpacks = clModel.getList(); final Pattern pat = regexp - ? Pattern.compile(txt, ignoreCase ? Pattern.CASE_INSENSITIVE : 0) - : Pattern.compile(Pattern.quote(txt), ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + ? Pattern.compile(txt, ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0) + : Pattern.compile(Pattern.quote(txt), ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0); int pos = 0; for (final ScriptPack pack : allpacks) { pos++; diff --git a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 8ab8ddea3..ae92aeac1 100644 --- a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -252,9 +252,9 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene final List found = new ArrayList<>(); Pattern pat; if (regexp) { - pat = Pattern.compile(txt, ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + pat = Pattern.compile(txt, ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0); } else { - pat = Pattern.compile(Pattern.quote(txt), ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + pat = Pattern.compile(Pattern.quote(txt), ignoreCase ? (Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE) : 0); } int pos = 0; for (Entry item : asms.entrySet()) {