Blame alexandria-0.6.8-iconview-multibyte.patch
|
TASAKA Mamoru |
0472321 |
--- alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb.icon_multibyte 2012-05-30 10:04:18.132330198 +0900
|
|
TASAKA Mamoru |
0472321 |
+++ alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb 2012-05-29 18:29:54.430690741 +0900
|
|
TASAKA Mamoru |
0472321 |
@@ -824,6 +824,9 @@
|
|
TASAKA Mamoru |
0472321 |
iter[Columns::IDENT] = book.ident.to_s
|
|
TASAKA Mamoru |
0472321 |
iter[Columns::TITLE] = book.title
|
|
TASAKA Mamoru |
0472321 |
title = book.title.sub(REDUCE_TITLE_REGEX, '\1...')
|
|
TASAKA Mamoru |
0472321 |
+ # More nice method is needed here...
|
|
TASAKA Mamoru |
0472321 |
+ title = title.encode("UTF-16", "UTF-8", :invalid => :replace, :undef => :replace, :replace => ".")
|
|
TASAKA Mamoru |
0472321 |
+ title = title.encode("UTF-8")
|
|
TASAKA Mamoru |
0472321 |
iter[Columns::TITLE_REDUCED] = title
|
|
TASAKA Mamoru |
0472321 |
# Don't know why, however force_encoding seems needed here to
|
|
TASAKA Mamoru |
0472321 |
# prevent crash...
|