diff options
author | wycats <wycats@gmail.com> | 2010-03-17 00:54:42 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-17 00:54:42 -0700 |
commit | 7a83abe52fd982c2b34e8026f3ae34664ad60bc6 (patch) | |
tree | 4acd44ce40ee157a11a9da345245727a092dcaef /activesupport/lib/active_support/inflector | |
parent | 640ee5b68d1078fc164bd4e10c019f284ad9b760 (diff) | |
download | rails-7a83abe52fd982c2b34e8026f3ae34664ad60bc6.tar.gz rails-7a83abe52fd982c2b34e8026f3ae34664ad60bc6.tar.bz2 rails-7a83abe52fd982c2b34e8026f3ae34664ad60bc6.zip |
Any reason we can't just use the slow 1.8 path for transliteration in 1.9?
Diffstat (limited to 'activesupport/lib/active_support/inflector')
-rw-r--r-- | activesupport/lib/active_support/inflector/transliterate.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index 236f2eb628..2ce27cf406 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -14,8 +14,8 @@ module ActiveSupport if RUBY_VERSION >= '1.9' undef_method :transliterate def transliterate(string) - warn "Ruby 1.9 doesn't support Unicode normalization yet" - string.dup + proxy = ActiveSupport::Multibyte.proxy_class.new(string) + proxy.normalize(:kd).gsub(/[^\x00-\x7F]+/, '') end # The iconv transliteration code doesn't function correctly |