isoCodeToResourceId.put("CI", R.string.CI);\r
isoCodeToResourceId.put("YI", R.string.YI);\r
isoCodeToResourceId.put("ZU", R.string.ZU);\r
- \r
- \r
+\r
+ isoCodeToResourceId.put("AZ", R.string.AZ);\r
+ isoCodeToResourceId.put("EU", R.string.EU);\r
+ isoCodeToResourceId.put("BR", R.string.BR);\r
+ isoCodeToResourceId.put("MR", R.string.MR);\r
+ isoCodeToResourceId.put("FO", R.string.FO);\r
+ isoCodeToResourceId.put("GL", R.string.GL);\r
+ isoCodeToResourceId.put("HT", R.string.HT);\r
+ isoCodeToResourceId.put("LB", R.string.LB);\r
+ isoCodeToResourceId.put("MK", R.string.MK);\r
+\r
// Hack to allow lower-case ISO codes to work:\r
for (final String isoCode : new ArrayList<String>(isoCodeToResourceId.keySet())) {\r
isoCodeToResourceId.put(isoCode.toLowerCase(), isoCodeToResourceId.get(isoCode));\r
*/\r
private static final String rtlChars =\r
"\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC";\r
- private static final Pattern RTL_TOKEN = Pattern.compile("[" + rtlChars + "]");\r
+\r
+ private static final String puncChars =\r
+ "\\[\\]\\(\\)\\{\\}\\=";\r
+\r
+ private static final Pattern RTL_LEFT_BOUNDARY = Pattern.compile("(["+ puncChars +"])([" + rtlChars + "])");\r
+ private static final Pattern RTL_RIGHT_BOUNDARY = Pattern.compile("([" + rtlChars + "])(["+ puncChars +"])");\r
\r
- public static String fixBidiText(final String text) {\r
- // TODO: fix me!, use me!\r
+ public static String fixBidiText(String text) {\r
+// text = RTL_LEFT_BOUNDARY.matcher(text).replaceAll("$1\u200e $2");\r
+// text = RTL_RIGHT_BOUNDARY.matcher(text).replaceAll("$1 \u200e$2");\r
return text;\r
}\r
\r