Hi,
On Mon, Apr 28, 2008 at 08:44:15PM +1000, Bohan Huang wrote:
> Sorry, will read documentation more throughly next time.
>
> Thanks for explaining the reasons why the user should edit global manually
No problem. Although I marked as wontfix, I tried a quick hack. So far
it is not working. Just as placeholder, I attache what I did as patch.
Ming, can you fix this?
Osamu
diff -Nru 20080429-012011/configs/global 20080429-032525/configs/global
--- 20080429-012011/configs/global 2008-04-29 01:20:11.000000000 +0900
+++ 20080429-032525/configs/global 2008-04-29 03:25:31.000000000 +0900
@@ -1,4 +1,4 @@
-/SupportedUnicodeLocales = en_US.UTF-8
+/SupportedUnicodeLocales = *.UTF-8
/DefaultPanelProgram = scim-panel-gtk
/DefaultConfigModule = simple
/DefaultSocketFrontEndAddress = local:/tmp/scim-socket-frontend
diff -Nru 20080429-012011/debian/changelog 20080429-032525/debian/changelog
--- 20080429-012011/debian/changelog 2008-04-29 01:20:11.000000000 +0900
+++ 20080429-032525/debian/changelog 2008-04-29 03:25:26.000000000 +0900
@@ -1,3 +1,15 @@
+scim (1.4.7-3.star02) test; urgency=low
+
+ * Validate *.UTF-8 too.
+
+ -- Osamu Aoki <[EMAIL PROTECTED]> Tue, 29 Apr 2008 03:05:26 +0900
+
+scim (1.4.7-3.star01) test; urgency=low
+
+ * Test build for *.UTF-8 support.
+
+ -- Osamu Aoki <[EMAIL PROTECTED]> Tue, 29 Apr 2008 02:19:33 +0900
+
scim (1.4.7-3) unstable; urgency=low
The "give credit where credit is due" release.
diff -Nru 20080429-012011/debian/README.Debian 20080429-032525/debian/README.Debian
--- 20080429-012011/debian/README.Debian 2008-04-29 01:20:11.000000000 +0900
+++ 20080429-032525/debian/README.Debian 2008-04-29 03:25:26.000000000 +0900
@@ -70,9 +70,15 @@
/SupportedUnicodeLocales = <your_locale>
to your ~/.scim/global file unless you use en_US.UTF-8 locale (which is
supported by default). The <your_locale> string should be in ll_CC.UTF-8
-form, where ll being the language, and CC being the country. You can always
-use the "locale" command to check your locale setting. You can also add
-mutiple locales there, just separate them by comma without space, like
+form, where ll being the language, and CC being the country. This Debian
+version is modified to accept *.UTF-8 as special locale string which matches
+any UTF-8 locales and set the default ~/.scim/global value to:
+ /SupportedUnicodeLocales = *.UTF-8
+
+You can use the "locale" command to check your locale setting.
+
+You can also add mutiple special locales there, just separate them by comma
+without space, like
/SupportedUnicodeLocales = en_US.UTF-8,en_GB.UTF_8,fr_FR.UTF-8
If you have never used SCIM before, your ~/.scim/global may be not existent.
diff -Nru 20080429-012011/src/scim_backend.cpp 20080429-032525/src/scim_backend.cpp
--- 20080429-012011/src/scim_backend.cpp 2008-04-29 01:20:11.000000000 +0900
+++ 20080429-032525/src/scim_backend.cpp 2008-04-29 03:25:25.000000000 +0900
@@ -53,6 +53,12 @@
bool operator () (const String &rhs) const {
if (m_lhs == rhs) return true;
+ // Match any locale string with "*"
+ if ((scim_get_locale_language (m_lhs) == scim_get_locale_language (rhs) ||
+ scim_get_locale_language (m_lhs) == "*" || scim_get_locale_language (rhs) == "*") &&
+ scim_get_locale_encoding (m_lhs) == scim_get_locale_encoding (rhs) &&
+ m_lhs.find ('.') != String::npos && rhs.find ('.') != String::npos)
+ return true;
if (scim_get_locale_language (m_lhs) == scim_get_locale_language (rhs) &&
scim_get_locale_encoding (m_lhs) == scim_get_locale_encoding (rhs) &&
m_lhs.find ('.') != String::npos && rhs.find ('.') != String::npos)
diff -Nru 20080429-012011/src/scim_utility.cpp 20080429-032525/src/scim_utility.cpp
--- 20080429-012011/src/scim_utility.cpp 2008-04-29 01:20:11.000000000 +0900
+++ 20080429-032525/src/scim_utility.cpp 2008-04-29 03:25:25.000000000 +0900
@@ -292,7 +292,10 @@
String last = String (setlocale (LC_CTYPE, 0));
- if (setlocale (LC_CTYPE, locale.c_str ())) {
+ if (locale == "*.UTF-8") {
+ // validate bogus *.UTF-8
+ good = locale;
+ } else if (setlocale (LC_CTYPE, locale.c_str ())) {
good = locale;
} else {
std::vector<String> vec;