projects
/
rails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add new note marker to root map layer instead of noteLayer
[rails.git]
/
lib
/
utf8.rb
diff --git
a/lib/utf8.rb
b/lib/utf8.rb
index 5f0d219baa10293e104fb7decfa916ac0ea79100..613e3005ea68aedf5815f0c37e023fda557ced8d 100644
(file)
--- a/
lib/utf8.rb
+++ b/
lib/utf8.rb
@@
-4,11
+4,7
@@
module UTF8
# using the iconv library, which is in the standard library.
def self.valid?(str)
return true if str.nil?
- Iconv.conv("UTF-8", "UTF-8", str)
- return true
-
- rescue
- return false
- end
-end
+ str.valid_encoding?
+ end
+end