sandsmark/QuasselDroid — Issue #47: Colour Parsing Ignores "Reset" Code (and other formatting bugs)
Author: aziraphale
Created: 2011-12-08 11:59:28+00:00
State: open

The mIRC colour parsing currently ignores the "reset" code (^O / ASCII decimal 15 / hex 0x0F), so formatting proceeds until the end of the message instead of resetting to the default format, and the "reset" character is displayed as an "invalid glyph" type "box" instead of being stripped out.

---

A related issue is that the style formatting doesn't work properly when there are multiple of the same type of formatting in a single message and "reset" codes are used to turn off those styles.

For example, (using [B] and [O] in place of the mIRC control codes for bold and reset):
```[B]foo[O] bar [B]baz[O] qux```

will be displayed as:
**foo[] bar** baz[] qux

instead of the expected:
**foo** bar **baz** qux

---

And finally, using two identical control characters next to each other (e.g. "F[B][B]oo") - which is a trick that I use with an IRC bot to prevent it highlighting people in certain circumstances - seems to result in the message being given that format until the line wraps. Compare these two screenshots of this same message:
```[B]Bold[O] Normal [B]B[B][B]old[O]: A whole bunch of normal text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.```

being displayed with the phone in different orientations:
[![Imgur](http://i.imgur.com/RjDQml.png)](http://imgur.com/RjDQm)