[fantasdic] Removing single null bytes is dangerous.
- From: Mathieu Blondel <mblondel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fantasdic] Removing single null bytes is dangerous.
- Date: Fri, 16 Apr 2010 06:46:57 +0000 (UTC)
commit c56855230f6423e3d7254cdb4fb3c95d34c341b6
Author: Mathieu Blondel <mathieu mblondel org>
Date: Fri Apr 16 15:46:18 2010 +0900
Removing single null bytes is dangerous.
lib/fantasdic/sources/epwing_dictionary.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/fantasdic/sources/epwing_dictionary.rb b/lib/fantasdic/sources/epwing_dictionary.rb
index f2e24d4..283afc2 100644
--- a/lib/fantasdic/sources/epwing_dictionary.rb
+++ b/lib/fantasdic/sources/epwing_dictionary.rb
@@ -100,9 +100,9 @@ class EpwingDictionary < Base
items.map do |head, contents|
defi = Definition.new
- defi.word = convert_to_utf8("euc-jp", head).gsub("\000", "")
+ defi.word = convert_to_utf8("euc-jp", head)
defi.body = convert_to_utf8("euc-jp", contents)
- defi.body.gsub!("\000", "")
+ defi.body.gsub!("\000"*4, "")
defi.database = name
defi.description = name.capitalize
defi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]