Skip to content
Browse files

ASCII to UTF8 to support Chinese Character truncate issue

  • Loading branch information...
1 parent cbdf31b commit 481585d2f25aeaefe83139225c05decc55280f07 @brucebot brucebot committed Apr 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 html_filters.rb
View
2 html_filters.rb
@@ -6,7 +6,7 @@ module Liquid
module StandardFilters
def truncatehtml(raw, max_length = 15, continuation_string = "...")
- doc = Nokogiri::HTML(Iconv.conv('ASCII//TRANSLIT//IGNORE', 'UTF8', raw))
+ doc = Nokogiri::HTML(Iconv.conv('UTF8//TRANSLIT//IGNORE', 'UTF8', raw))
current_length = 0;
deleting = false
to_delete = []

1 comment on commit 481585d

@yanping

But it doesn't work on Windows.

Please sign in to comment.
Something went wrong with that request. Please try again.