How about commenting line 10.?
Trying to put it back to ansi which is the utf8 doesn't covert to nothing but 7 bit ascii
I tried that, didn't seem to do anything either way but following your advice I'm not using that line now, but this is what I currently have.
txt := Clipboard.AsText;
txt := RemoveFancyQuotes(txt);
txt := RemoveFancySingle(txt);
txt := sysUtils.StringReplace(txt, '—', '-', [rfReplaceAll,rfIgnoreCase]);
txt := sysUtils.StringReplace(txt, chr(96), '-', [rfReplaceAll,rfIgnoreCase]);
txt := Utf8StringReplace(txt, '—', '-', [rfReplaceAll,rfIgnoreCase]);
txt := Utf8StringReplace(txt, S, '-', [rfReplaceAll,rfIgnoreCase]);
rtfEditor.selText := txt;
As you can see I'm tidying up the input as it comes off the clipboard, makes me wonder if that weird dash (which I'm not even sure is just an emdash anymore), is being made weird before I can do any changes. I suppose does anyone know what the character actually is? And I converted to RTF the file I'm using, searched out the area the weird dash is and according to that the code is 96, but as you can see I'm trying to replace that to no avail. It end's up looking like a quote, with an extra space, but in point of fact when exporting to a html file, it looks like a question mark then a quote.
This is all quite frustrating, and it's a grammar rule in Word. Now I don't personally allow that change, but this is essentially customized writing software and my editor/beta apparently does, so I'm trying to come up with an automated way to correct that. So far I've managed to sort out the curly/fancy single and double quotes but that darn dash is a darn nightmare (Replace darn for something far more fitting for my level of frustration
). If ANY one has any ideas on how to solve this I would be ever-so grateful. It's a bit more than a niggle at this point, and as noted when I export for publishing it looks just nasty. Now I will obviousy ask my editor/beta to cut out using that rule, but that would just be them and I hope to have a wider audience.
Thanks, really, thanks for the help I've gotten so far, this forum rocks.
CJ