Permalink
Browse files

handle the easy cases of grave accent

  • Loading branch information...
rsl committed Dec 7, 2012
1 parent e8371aa commit 3efd02a1b4914b8f90787fe44ad8703d243d74b9
@@ -14,7 +14,7 @@ class << self
#
# You're probably better off just using the added String#to_ascii
def decode(string)
- string.gsub(/[^\x00-\x7f]/u) do |codepoint|
+ string.gsub(/[^\x00-\x00]/u) do |codepoint|
if localized = local_codepoint(codepoint)
localized
else
@@ -95,7 +95,7 @@
- ']'
- '^'
- _
-- '`'
+- "'"
- a
- b
- c
@@ -186,10 +186,10 @@
- y
- "'"
- '"'
-- '`'
- "'"
-- '`'
-- '`'
+- "'"
+- "'"
+- "'"
- "'"
- '?'
- '?'
@@ -202,14 +202,14 @@
- "'"
- '-'
- /
-- '`'
+- "'"
- ','
- _
- \
- /
- ':'
- .
-- '`'
+- "'"
- "'"
- '^'
- V
@@ -225,7 +225,7 @@
- n
- n
- s
-- '`'
+- "'"
- p
- p
- ts
@@ -56,7 +56,7 @@
- D
- T
- Z
-- '`'
+- "'"
- G
- '[?]'
- '[?]'
@@ -36,7 +36,7 @@
- n
- s
- s
-- '`'
+- "'"
- p
- p
- S
@@ -64,7 +64,7 @@
- u
- o
- ''
-- '`'
+- "'"
- "'"
- ''
- ''
@@ -161,7 +161,7 @@
- d
- t
- z
-- '`'
+- "'"
- gh
- q
- w
@@ -82,7 +82,7 @@
- AUM
- "'"
- "'"
-- '`'
+- "'"
- "'"
- '[?]'
- '[?]'
@@ -44,7 +44,7 @@
- s
- h
- l
-- '`'
+- "'"
- h
- '~'
- a
@@ -172,7 +172,7 @@
- s
- h
- '[?]'
-- '`'
+- "'"
- ''
- '~'
- a
@@ -238,7 +238,7 @@
- R
- '"`'
- "\"'"
-- '`'
+- "'"
- '[?]'
- '[?]'
- o
@@ -253,4 +253,4 @@
- O
- O
- "'"
-- '`'
+- "'"
@@ -52,7 +52,7 @@
- "'"
- '"'
- "'''"
-- '`'
+- "'"
- '``'
- '```'
- '^'
@@ -31,7 +31,7 @@
- yi
- ''
- ay
-- '`'
+- "'"
- ''
- d
- h
@@ -63,7 +63,7 @@
- ']'
- '^'
- _
-- '`'
+- "'"
- a
- b
- c
@@ -107,7 +107,7 @@ def test_underscores
end
def test_grave_accents
- assert_equal_encoded "`", %w{0060 02cb 2035}
+ assert_equal_encoded "'", %w{0060 02cb 2035}
end
def test_bars
View
@@ -37,7 +37,7 @@ class UnidecoderTest < Test::Unit::TestCase
"من می توانم بدونِ احساس درد شيشه بخورم" => # Persian
"mn my twnm bdwni Hss drd shyshh bkhwrm",
"أنا قادر على أكل الزجاج و هذا لا يؤلمن" => # Arabic
- "'n qdr `l~ 'kl lzjj w hdh l yw'lmn",
+ "'n qdr 'l~ 'kl lzjj w hdh l yw'lmn",
"אני יכול לאכול זכוכית וזה לא מזיק לי" => # Hebrew
"ny ykvl lkvl zkvkyt vzh l mzyq ly",
"ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ" => # Thai

0 comments on commit 3efd02a

Please sign in to comment.