ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: Frenzie on April 04, 2016, 06:35:07 am

Title: Em dash is changed into two hyphens (?)
Post by: Frenzie on April 04, 2016, 06:35:07 am
Em dash: —
En dash: –
Regular dash/hyphen: -

In order: —–-. All three should be different in the output, not just in the edit dialog. This is UTF-8, after all.
Title: Re: Em dash is changed into two hyphens (?)
Post by: Frenzie on April 04, 2016, 06:40:53 am
Okay, so apparently this (https://github.com/ElkArte/ElkArte/blob/9de15b6bde837407693dce8d28d9a24dd930d4bf/sources/Subs.php#L1421-L1455) must be triggered even though I'm nowhere near anything Microsoft atm. I'm entering proper Unicode using the compose key, in Firefox 45 on Debian/unstable. And in any case, the MS characters should be replaced with their Unicode equivalents or HTML entity equivalents (like in the trailing comments), not with what it's actually replaced with.

Edit: Okay, update. These are simply the real UTF-8 encodings. See e.g. http://unicode-table.com/en/2014/ There's nothing "MS" about them.

I propose to remove the sanitizeMSCutPaste() function as harmful garbage.  8) Its only use seems to be in
a non-UTF8 context (https://github.com/SimpleMachines/SMF2.1/blob/97876e73732658f41566808a7678fa0083cf2cd3/Sources/Subs.php#L4547-L4557).
Title: Re: Em dash is changed into two hyphens (?)
Post by: emanuele on April 04, 2016, 07:16:18 am
Moving to exterminated as duplicate of: http://www.elkarte.net/community/index.php?topic=3272.0

Just to avoid spreading. ;)
Title: Re: Em dash is changed into two hyphens (?)
Post by: Frenzie on April 04, 2016, 08:12:14 am
D'oh.