bugBattle for Wesnoth - Bugs: bug #22139, utils/utf8::lowercase() does not...

 
 
Show feedback again

bug #22139: utils/utf8::lowercase() does not work

Submitted by:  Ignacio R. Morelle <shadowmaster>
Submitted on:  Wed 04 Jun 2014 12:41:41 AM UTC  
 
Category: BugSeverity: 5 - Blocker
Priority: 7 - HighItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: Alexander van Gessel <ai0867>Open/Closed: Closed
Release: 1.11.12 and later, master (1.13.0-dev)Operating System: Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 04 Jun 2014 09:41:56 AM UTC, comment #2:

Fixed in b6508091a23c and 7cd9583bdd2f. (see PR #189)

Alexander van Gessel <ai0867>
Project MemberIn charge of this item.
Wed 04 Jun 2014 01:37:56 AM UTC, comment #1:

Upon further inspection, this can also be expected to break wesnothd's name blacklisting and ban management code under certain circumstances.

Also, PR #189 has a potential fix which I have tested (only on Linux, though) and works.

Ignacio R. Morelle <shadowmaster>
Project Administrator
Wed 04 Jun 2014 12:41:41 AM UTC, original submission:

The utils/utf8::lowercase() function returns the input string as-is instead of a lowercase version for me, since some point after 1.11.11 was tagged.

I first noticed the issue while working with campaignd, but it turns out that it's more general than that and it can also be reproduced with a simple snippet in the game's main() function in game.cpp:

For 1.11.11, this prints:

> original case: 'FOO' lower case: 'foo'


But for any later version:

> original case: 'FOO' lower case: 'FOO'


(*Note:* On master, utils::lowercase() was apparently replaced with utf8::lowercase(), which requires including "serialization/unicode.hpp" in game.cpp.)

The suspicious thing here is that I can only reproduce this issue on my Linux system (running Debian jessie, amd64), and not on a Windows 8.1 VM (64-bit too, but the build is 32-bit). It also appears that the libc tolower() function works correctly, so the problem must be somewhere in our side of the implementation of utils/utf8::lowercase().

I tried both with gcc (4.8.3-2) and clang (3.3-16), same result each time.

I'm marking this as a blocker because, while I really have no idea what this can break besides campaignd, the effect on the latter is already impressive -- the test performed to verify whether an upload is a reupload fails, and thus the add-ons list gets duplicates of every reuploaded add-on.

Ignacio R. Morelle <shadowmaster>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ai0867 (Posted a comment)
  • -unavailable- added by shadowmaster (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Jul 2014 04:15:03 AM UTCshadowmasterOpen/ClosedOpen=>Closed
    Wed 04 Jun 2014 09:41:56 AM UTCai0867StatusNone=>Fixed
      Assigned toNone=>ai0867
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup