aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_kvv.c
diff options
context:
space:
mode:
authorharbaum <harbaum@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-23 17:45:37 +0000
committerharbaum <harbaum@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-23 17:45:37 +0000
commitbd4bfe2976d3ccc422b103d336670adcaa9b865f (patch)
treedf7945b8d22f26439f11f683189dcbb940ce17bf /plugin_kvv.c
parentd8683a483326ba9964e7f65482f874560bb16a2b (diff)
downloadlcd4linux-bd4bfe2976d3ccc422b103d336670adcaa9b865f.tar.gz
[lcd4linux @ 2006-08-23 17:45:37 by harbaum]
Umlaut translation bugfix git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@701 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_kvv.c')
-rw-r--r--plugin_kvv.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/plugin_kvv.c b/plugin_kvv.c
index e7aac35..bb3b840 100644
--- a/plugin_kvv.c
+++ b/plugin_kvv.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_kvv.c,v 1.6 2006/08/17 19:11:41 harbaum Exp $
+/* $Id: plugin_kvv.c,v 1.7 2006/08/23 17:45:37 harbaum Exp $
*
* plugin kvv (karlsruher verkehrsverbund)
*
@@ -23,6 +23,9 @@
*
*
* $Log: plugin_kvv.c,v $
+ * Revision 1.7 2006/08/23 17:45:37 harbaum
+ * Umlaut translation bugfix
+ *
* Revision 1.6 2006/08/17 19:11:41 harbaum
* Small plugin_kvv bugfixes and new abbreviate option
*
@@ -309,6 +312,22 @@ static void process_station_string(char *str)
"Marktplatz", "Marktpl.",
};
+ /* decode utf8 */
+ p = q = str;
+ last = 0;
+ while (*p) {
+ if (last) {
+ *q++ = (last << 6) | (*p & 0x3f);
+ last = 0;
+ } else if ((*p & 0xe0) == 0xc0) {
+ last = *p & 3;
+ } else
+ *q++ = *p;
+
+ p++;
+ }
+ *q++ = 0;
+
/* erase multiple spaces and replace umlauts */
p = q = str;
last = 1; // no leading spaces
@@ -333,22 +352,6 @@ static void process_station_string(char *str)
}
*q++ = 0;
- /* decode utf8 */
- p = q = str;
- last = 0;
- while (*p) {
- if (last) {
- *q++ = (last << 6) | (*p & 0x3f);
- last = 0;
- } else if ((*p & 0xe0) == 0xc0) {
- last = *p & 3;
- } else
- *q++ = *p;
-
- p++;
- }
- *q++ = 0;
-
/* replace certain (long) words with e.g. abbreviations if enabled */
if (abbreviate) {