thbrk 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/thbrk/core_ext.rb +4 -4
- metadata +1 -1
data/lib/thbrk/core_ext.rb
CHANGED
@@ -7,11 +7,11 @@ require 'libthai'
|
|
7
7
|
String.class_eval do
|
8
8
|
def to_thbrk
|
9
9
|
|
10
|
-
utf8_to_tis620 = Iconv.new("TIS620", "UTF-8")
|
11
|
-
a = LibThai::brk_line(utf8_to_tis620.iconv(self))
|
10
|
+
utf8_to_tis620 = Iconv.new("TIS620//IGNORE", "UTF-8")
|
11
|
+
a = LibThai::brk_line(utf8_to_tis620.iconv(self).join(""))
|
12
12
|
|
13
|
-
tis620_to_utf8 = Iconv.new("UTF-8", "TIS620")
|
14
|
-
o = tis620_to_utf8.iconv(a)
|
13
|
+
tis620_to_utf8 = Iconv.new("UTF-8//IGNORE", "TIS620")
|
14
|
+
o = tis620_to_utf8.iconv(a).join("")
|
15
15
|
|
16
16
|
return o
|
17
17
|
end
|