View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003091 | FSSCP | user interface | public | 2014-08-11 03:31 | 2014-08-11 07:57 |
Reporter | Yarn | Assigned To | Yarn | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows 7 | ||
Product Version | 3.7.1 | ||||
Summary | 0003091: Accented letters treated as spaces during colorization [patch] | ||||
Description | During text colorization, FSO uses the is_a_word_separator() function in missionbriefcommon.cpp to determine when to stop colorizing a word. That function considers a word separator to be any char value that is 32 or less. This includes negative numbers. However, depending on the compiler, the char type can be (and usually is) signed by default, resulting in non-ASCII characters being treated as word separators during colorization. Because of this, if a word like "Gerüchte" is colorized the "retail" way, only the letters before the first non-Ascii characer (in this case, "Ger") is colorized; the rest is displayed as the default white. The fix is simple: Modify is_a_word_separator() to explicitly specify 0 as the low end of the range that's considered a word separator. A patch that does just this is attached. | ||||
Tags | No tags attached. | ||||
|
mantis3091.patch (511 bytes)
Index: code/mission/missionbriefcommon.cpp =================================================================== --- code/mission/missionbriefcommon.cpp (revision 10985) +++ code/mission/missionbriefcommon.cpp (working copy) @@ -1425,7 +1425,7 @@ */ bool is_a_word_separator(char character) { - return character <= 32; // all control characters including space, newline, and tab + return ((character >= 0) && (character <= 32)); // all control characters including space, newline, and tab } /** |
|
Seems straightforward enough to me. |
|
Fix committed to trunk@10986. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-11 03:31 | Yarn | New Issue | |
2014-08-11 03:31 | Yarn | Status | new => assigned |
2014-08-11 03:31 | Yarn | Assigned To | => Yarn |
2014-08-11 03:31 | Yarn | File Added: mantis3091.patch | |
2014-08-11 03:32 | Yarn | Status | assigned => code review |
2014-08-11 05:00 | MageKing17 | Note Added: 0016201 | |
2014-08-11 07:57 | niffiwan | Changeset attached | => fs2open trunk r10986 |
2014-08-11 07:57 | niffiwan | Note Added: 0016203 | |
2014-08-11 07:57 | niffiwan | Status | code review => resolved |
2014-08-11 07:57 | niffiwan | Resolution | open => fixed |