Permalink
Browse files

page number generation should handle unicode params like 沖縄南部

  • Loading branch information...
1 parent 260c1c4 commit 68c12be0f48ddc846b0a5a4cee170bb804f6e3ba @twoism committed Jan 5, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/will_paginate/view_helpers.rb
@@ -343,9 +343,9 @@ def url_for(page)
else
@url_string = url
@url_params[param_name] = 3
- @template.url_for(@url_params).split(//).each_with_index do |char, i|
- if char == '3' and url[i, 1] == '2'
- @url_string[i] = "\0"
+ @template.url_for(@url_params).mb_chars.split(//).each_with_index do |char, i|
+ if char.to_s == '3' and url.mb_chars[i, 1].to_s == '2'
+ @url_string.mb_chars[i] = "\0"
break
end
end

0 comments on commit 68c12be

Please sign in to comment.