Flowdock
method

valid_encoding?

Importance_1
valid_encoding?() public

Returns true for a string which encoded correctly.

"\xc2\xa1".force_encoding("UTF-8").valid_encoding? => true
"\xc2".force_encoding("UTF-8").valid_encoding? => false
"\x80".force_encoding("UTF-8").valid_encoding? => false
Show source
Register or log in to add new notes.