File: encoding_helper.rb

package info (click to toggle)
ruby-faye 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,792 kB
  • sloc: javascript: 14,833; ruby: 5,068; makefile: 30
file content (6 lines) | stat: -rw-r--r-- 149 bytes parent folder | download
1
2
3
4
5
6
module EncodingHelper
  def encode(string)
    return string unless string.respond_to?(:force_encoding)
    string.force_encoding("UTF-8")
  end
end