In chat conversations, my name appears as "Pierre-" when it should be "Pierre-Antoine" or at very least "Pierre".
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
Your name doesn't necessarily appear as "Pierre-"; that depends on the width of your browser window (and other issues like the font your browser uses, it's rendering engine, etc.)
These three screenshots of the same message were taken with no change other than changing the width of the window:
In Chrome 8 on my Windows 7 box, your user name appears as "Pierre-Antoine" in live chat when the window is about 1470 pixels wide.
Another thing to note is that there are actually two versions of your signature. If there's enough space (e.g. because you said several things in a row), you'll instead get this version:
– and in this case, it's clearly correct that the hyphen is on the first line.
Both versions of the signature use the browser's line breaking algorithm to determine what to show – in case of the small signature, everything but the first line is just hidden away from display.
So what to do? Unicode to the rescue!
We now consider a dash* in a username that is preceded and followed by neither another dash nor a whitespace character to be a hyphen, and we replace this dash with the corresponding unicode character.
* The correct name is actually Hyphen-Minus, codepoint U+002D – typographically speaking, a dash is a totally different beast.