Quantcast WoWInterface - View Single Post - Lua code help (stuf text)
View Single Post
05-27-13, 01:25 PM   #11
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 336
I just still wonder why it is a match. The representation of the 'a ' as lua escape sequence is \208\176\32. One can verify that by:
lua Code:
  1. local str = "Ецхо оф а Пандарен Монк"
  3. for i=1, #str do
  4.    print(i, str:byte(i))
  5. end

In my match pattern I demand a non-space character, followed by zero or more characters from the range between \128 and \191, followed by one or more non-space characters, followed by a space character. \32 is a space character, but there is nothing else between \176 and \32, so the match should actually fail. As it appears, it matches the \208 in my capture, the \176 as the non-space char and the \32 as the space char. So why does it skip the \176 in the capture, when '*' means zero or more and the longest possible match of that?

Appart from that, I don't believe single characters would occur in unit names in the russian locale. The translation for 'a' is 'один'/'одна'/'одно' (they decline those depending on gender). Is there a way to verify that on wowhead?
  Reply With Quote