]> gitweb.fluxo.info Git - awesompd.git/commitdiff
Reverted to 4-digits UTF symbols from Jamendo
authorAlexander Yakushev <yakushev.alex@gmail.com>
Mon, 7 Nov 2011 21:13:17 +0000 (23:13 +0200)
committerAlexander Yakushev <yakushev.alex@gmail.com>
Mon, 7 Nov 2011 21:13:17 +0000 (23:13 +0200)
Still no idea how to tell apart symbol (\uXXXX)foo from (\uXXXXf)oo
where parentheses mark an UTF symbol.

jamendo.lua

index 23aae2cc4a224757f94a9f57dde29b27a13fcc92..a6989c60da26d9efe82605d312983ccc5dc8f304 100644 (file)
@@ -300,8 +300,8 @@ end
 -- them into symbols so we need to do it ourselves.
 function utf8_codes_to_symbols (s)
    local hexnums = "[%dabcdefABCDEF]"
-   local pattern = string.format("\\u(%s%s%s%s?%s?)", 
-                                 hexnums, hexnums, hexnums, hexnums, hexnums)
+   local pattern = string.format("\\u(%s%s%s%s?)", 
+                                 hexnums, hexnums, hexnums, hexnums)
    local decode = function(code)
                      code = tonumber(code, 16)
                      if code < 128 then -- one-byte symbol