Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11150
Merged at revision: 11327
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 31 lines (+7/-3)
2 files modified
src/util/utf8_string.h (+1/-1)
src/zorbautils/locale.cpp (+6/-2)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+155872@code.launchpad.net

Commit message

Now explicitly specifying UTF-8 in locale name.

Description of the change

Now explicitly specifying UTF-8 in locale name.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-03-28T00-19-45.109Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-03-28T02-06-39.685Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/util/utf8_string.h'
2--- src/util/utf8_string.h 2013-03-03 15:33:57 +0000
3+++ src/util/utf8_string.h 2013-03-28 00:15:35 +0000
4@@ -225,7 +225,7 @@
5 typedef typename string_traits_type::std_string_arg std_string_arg;
6 typedef typename string_traits_type::str_return_type str_return_type;
7
8- static size_type const npos = static_cast<size_type>( -1 );
9+ static size_type const npos = StringType::npos;
10
11 ////////// constructors & destructor ////////////////////////////////////////
12
13
14=== modified file 'src/zorbautils/locale.cpp'
15--- src/zorbautils/locale.cpp 2013-03-22 23:54:17 +0000
16+++ src/zorbautils/locale.cpp 2013-03-28 00:15:35 +0000
17@@ -261,9 +261,13 @@
18 locale_name += '_';
19 locale_name += iso3166_1::string_of[ country ];
20 }
21+ locale_name += ".UTF-8";
22 locale_t loc = ::newlocale( LC_TIME_MASK, locale_name.c_str(), nullptr );
23- if ( !loc && country ) // try it without the country
24- loc = ::newlocale( LC_TIME_MASK, iso639_1::string_of[ lang ], nullptr );
25+ if ( !loc && country ) { // try it without the country
26+ locale_name = iso639_1::string_of[ lang ];
27+ locale_name += ".UTF-8";
28+ loc = ::newlocale( LC_TIME_MASK, locale_name.c_str(), nullptr );
29+ }
30 return loc;
31 }
32

Subscribers

People subscribed via source and target branches