Skip to content

Commit

Permalink
ASCII to UTF8 to support Chinese Character truncate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yongqianme committed Apr 17, 2012
1 parent cbdf31b commit 481585d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html_filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

1 comment on commit 481585d

@yanping
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it doesn't work on Windows.

Please sign in to comment.