Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 861409 Details for
Bug 1063320
ABRT displays Traditional Chinese Strings under Simplified Chinese locale
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch fixing this bug
localization-properly-handle-locales-with-encoding-s.patch (text/plain), 3.17 KB, created by
Jakub Filak
on 2014-02-10 14:28:23 UTC
(
hide
)
Description:
Patch fixing this bug
Filename:
MIME Type:
Creator:
Jakub Filak
Created:
2014-02-10 14:28:23 UTC
Size:
3.17 KB
patch
obsolete
>From 09da182cd50ee9df08a20180d5fd1d136dc794d3 Mon Sep 17 00:00:00 2001 >From: Jakub Filak <jfilak@redhat.com> >Date: Sat, 8 Feb 2014 09:15:35 +0100 >Subject: [LIBREPORT PATCH 4/5] localization: properly handle locales with > encoding suffix > >XML nodes contain xml:lang attributes whose values are plain language >codes (en_GB, zh_CN, ...). > >libreport tries to find exact match with cur locale which may be >suffixed with char set identifier (.UTF-8). Therefore libreport never >finds exact match. > >This patch removes the encoding suffix from cur locale string. > >Closes to rhbz#1063320 > >Signed-off-by: Jakub Filak <jfilak@redhat.com> >--- > src/include/xml_parser.h | 2 +- > src/lib/event_xml_parser.c | 6 ++++-- > src/lib/workflow_xml_parser.c | 4 +++- > 3 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/src/include/xml_parser.h b/src/include/xml_parser.h >index 59517b3..36fd2ae 100644 >--- a/src/include/xml_parser.h >+++ b/src/include/xml_parser.h >@@ -22,7 +22,7 @@ > struct my_parse_data > { > workflow_t *workflow; >- const char *cur_locale; >+ char *cur_locale; > char *attribute_lang; > bool in_event_list; > bool exact_name; >diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c >index 2a6f477..1f98158 100644 >--- a/src/lib/event_xml_parser.c >+++ b/src/lib/event_xml_parser.c >@@ -60,7 +60,7 @@ struct my_parse_data > { > parsed_event_config_t event_config; > parsed_event_option_t cur_option; >- const char *cur_locale; >+ char *cur_locale; > char *attribute_lang; > bool in_adv_option; > }; >@@ -511,7 +511,8 @@ void load_event_description_from_file(event_config_t *event_config, const char* > { > log_notice("loading event: '%s'", filename); > struct my_parse_data parse_data = { {event_config, false, false, false}, {NULL, false, false}, NULL, NULL }; >- parse_data.cur_locale = setlocale(LC_ALL, NULL); >+ parse_data.cur_locale = xstrdup(setlocale(LC_ALL, NULL)); >+ strchrnul(parse_data.cur_locale, '.')[0] = '\0'; > > GMarkupParser parser; > memset(&parser, 0, sizeof(parser)); /* just in case */ >@@ -541,4 +542,5 @@ void load_event_description_from_file(event_config_t *event_config, const char* > > consume_cur_option(&parse_data); /* just in case */ > free(parse_data.attribute_lang); /* just in case */ >+ free(parse_data.cur_locale); > } >diff --git a/src/lib/workflow_xml_parser.c b/src/lib/workflow_xml_parser.c >index 681b171..0efc733 100644 >--- a/src/lib/workflow_xml_parser.c >+++ b/src/lib/workflow_xml_parser.c >@@ -165,7 +165,8 @@ void load_workflow_description_from_file(workflow_t *workflow, const char* filen > { > log_notice("loading workflow: '%s'", filename); > struct my_parse_data parse_data = { workflow, NULL, NULL, 0, 0, 0}; >- parse_data.cur_locale = setlocale(LC_ALL, NULL); >+ parse_data.cur_locale = xstrdup(setlocale(LC_ALL, NULL)); >+ strchrnul(parse_data.cur_locale, '.')[0] = '\0'; > > GMarkupParser parser; > memset(&parser, 0, sizeof(parser)); /* just in case */ >@@ -194,4 +195,5 @@ void load_workflow_description_from_file(workflow_t *workflow, const char* filen > g_markup_parse_context_free(context); > > free(parse_data.attribute_lang); /* just in case */ >+ free(parse_data.cur_locale); > } >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1063320
: 861409