Advertisement:

Author Topic: [SMF 2.1 RC2] Long and mid dashes don't work  (Read 1057 times)

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
[SMF 2.1 RC2] Long and mid dashes don't work
« on: June 21, 2019, 06:38:53 AM »
Don't work mid, long and very long (wiki-style) dashes:


— (very long also doesn't work here).

In Russian smf 2.1 RC2 instead of mid-dash and long dash, I get small dash -, instead of a very long dash I get two small dashes --.

You can get this dashes by alt+0150 and 0151. Don't know how to get the very long, I've just copied from wikipedia.

It's very important because mid-dash is often used in professional texts and Russian grammar requires to use it (and I suspect that English too).

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 580
Re: [SMF 2.1 RC2] Long and mid dashes don't work
« Reply #1 on: June 21, 2019, 07:24:29 AM »
Can confirm that the issue exists,
on my postgres env i could also see that the issue didn't happen in der process of saving.
Based on this is the issue a displaying issue.

issue got created: https://github.com/SimpleMachines/SMF2.1/issues/5720

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 580
Re: [SMF 2.1 RC2] Long and mid dashes don't work
« Reply #2 on: June 21, 2019, 11:34:14 AM »
Possible fix got created: https://github.com/SimpleMachines/SMF2.1/pull/5721
dunno if this get merged or not,
by looking at the code the behavior is wanted.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: [SMF 2.1 RC2] Long and mid dashes don't work
« Reply #3 on: June 27, 2019, 04:21:48 PM »
Possible fix got created: https://github.com/SimpleMachines/SMF2.1/pull/5721
dunno if this get merged or not,
by looking at the code the behavior is wanted.
Please, can you tell what exactly can I do to fix it? I just can't find these strings in subs.php that are indicated on GitHub.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: [SMF 2.1 RC2] Long and mid dashes don't work
« Reply #4 on: July 07, 2019, 03:31:22 PM »
The decision is:

1. Find in subs.php the string 5412:
Code: [Select]
// safe replacements
$replacechars = array(
',', // ‚
',,', // „
'...', // …
"'", // ‘
"'", // ’
'"', // “
'"', // ”
'-', // –
'--', // —
);
2. Change incorrect dashes to those which should be.