Merge lp:~paul-lucas/zorba/bug-942808 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 10683
Merged at revision: 10683
Proposed branch: lp:~paul-lucas/zorba/bug-942808
Merge into: lp:zorba
Diff against target: 30 lines (+13/-7)
1 file modified
src/util/icu_streambuf.cpp (+13/-7)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-942808
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+95027@code.launchpad.net

Commit message

Fixed bug 942808.

Description of the change

Fixed bug 942808.

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
Matthias Brantner (matthias-brantner) wrote :

It's kind of cheating. The question is why the ICU comparison didn't work?

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 :

The attempt to merge lp:~paul-lucas/zorba/bug-942808 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-942808-2012-02-28T19-46-04.742Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bug-942808-2012-02-28T20-38-04.132Z 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/icu_streambuf.cpp'
2--- src/util/icu_streambuf.cpp 2012-02-20 18:12:06 +0000
3+++ src/util/icu_streambuf.cpp 2012-02-28 19:36:18 +0000
4@@ -100,13 +100,19 @@
5 return conv;
6 }
7
8-bool icu_streambuf::is_necessary( char const *charset ) {
9- //
10- // Checking for "US-ASCII" explicitly isn't necessary since ICU knows about
11- // aliases.
12- //
13- return ucnv_compareNames( charset, "ASCII" )
14- && ucnv_compareNames( charset, "UTF-8" );
15+bool icu_streambuf::is_necessary( char const *cc_charset ) {
16+ //
17+ // Apparently, ucnv_compareNames() doesn't consider "US-ASCII" an alias for
18+ // "ASCII", so check for "US-ASCII" ourselves.
19+ //
20+ zstring charset( cc_charset );
21+ ascii::trim_whitespace( charset );
22+ ascii::to_upper( charset );
23+ if ( charset == "US-ASCII" )
24+ cc_charset += 3; // skip "US-"
25+
26+ return ucnv_compareNames( cc_charset, "ASCII" )
27+ && ucnv_compareNames( cc_charset, "UTF-8" );
28 }
29
30 bool icu_streambuf::is_supported( char const *charset ) {

Subscribers

People subscribed via source and target branches