From 189b5bcee8ee6082b31f55fb4e5b6c45a6913a98 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Wed, 24 Jun 2015 18:07:09 +0200 Subject: [PATCH] Move the encoding test to the files that actually need Latin-1. --- menu/intl/menu_hash_de.c | 8 ++++++++ menu/intl/menu_hash_fr.c | 8 ++++++++ menu/intl/menu_hash_pt.c | 8 ++++++++ menu/menu_hash.c | 8 -------- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/menu/intl/menu_hash_de.c b/menu/intl/menu_hash_de.c index 5b710ee1c7..aa9bd03603 100644 --- a/menu/intl/menu_hash_de.c +++ b/menu/intl/menu_hash_de.c @@ -19,6 +19,14 @@ #include "../menu_hash.h" + /* IMPORTANT: + * For non-english characters to work without proper unicode support, + * we need this file to be encoded in ISO 8859-1 (Latin1), not UTF-8. + * If you save this file as UTF-8, you'll break non-english characters + * (e.g. German "Umlauts" and Portugese diacritics). + */ +extern const char encoding_test[sizeof("ø")==2 ? 1 : -1]; + const char *menu_hash_to_str_de(uint32_t hash) { switch (hash) diff --git a/menu/intl/menu_hash_fr.c b/menu/intl/menu_hash_fr.c index bccf32d07a..4eb06f83e5 100644 --- a/menu/intl/menu_hash_fr.c +++ b/menu/intl/menu_hash_fr.c @@ -19,6 +19,14 @@ #include "../menu_hash.h" + /* IMPORTANT: + * For non-english characters to work without proper unicode support, + * we need this file to be encoded in ISO 8859-1 (Latin1), not UTF-8. + * If you save this file as UTF-8, you'll break non-english characters + * (e.g. German "Umlauts" and Portugese diacritics). + */ +extern const char encoding_test[sizeof("ø")==2 ? 1 : -1]; + const char *menu_hash_to_str_fr(uint32_t hash) { switch (hash) diff --git a/menu/intl/menu_hash_pt.c b/menu/intl/menu_hash_pt.c index 4a2c18a3cd..73828cae64 100644 --- a/menu/intl/menu_hash_pt.c +++ b/menu/intl/menu_hash_pt.c @@ -19,6 +19,14 @@ #include "../menu_hash.h" + /* IMPORTANT: + * For non-english characters to work without proper unicode support, + * we need this file to be encoded in ISO 8859-1 (Latin1), not UTF-8. + * If you save this file as UTF-8, you'll break non-english characters + * (e.g. German "Umlauts" and Portugese diacritics). + */ +extern const char encoding_test[sizeof("ø")==2 ? 1 : -1]; + const char *menu_hash_to_str_pt(uint32_t hash) { switch (hash) diff --git a/menu/menu_hash.c b/menu/menu_hash.c index 1e9fd1795e..b36a838817 100644 --- a/menu/menu_hash.c +++ b/menu/menu_hash.c @@ -22,14 +22,6 @@ #include "../configuration.h" - /* IMPORTANT: - * For non-english characters to work without proper unicode support, - * we need this file to be encoded in ISO 8859-1 (Latin1), not UTF-8. - * If you save this file as UTF-8, you'll break non-english characters - * (e.g. German "Umlauts" and Portugese diacritics). - */ -extern const char encoding_test[sizeof("ø")==2 ? 1 : -1]; - const char *menu_hash_to_str(uint32_t hash) { const char *ret = NULL;