View Single Post
05-24-13, 10:07 PM   #7
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
I have a very similar issue I posted about here and Phanx pointed me to this thread as it closely relates to my problem.

What SDPhantom suggested (unit:gsub("(%S)%S*%s+","%1%.")) is what I looked for, but I need to make this work with languages other than english. The string I test with is "Echo of a Pandaren Monk" and the single 'a' appears to be the problem if I use the following:

Code:
unit:gsub("(.[\128-\191]*)%S+%s", "%1. ")
.
I get "E. o. a . Monk" instead of "E. o. a P. Monk".

I also don't understand what exactly is .[\128-\191]* supposed to mean but it makes it work for non-english characters (haven't tested chinese and korean though, but I do not look for such functionality).

Sorry for writing in between.
  Reply With Quote