def to_utf8
            detect_encoding

            utf16 = self.encoding.to_utf16be(self.value)
            utf16.slice!(0, Encoding::UTF16BE::BOM.size)

            utf16.encode("utf-8", "utf-16be")
        end
def to_utf8
            detect_encoding

            utf16 = self.encoding.to_utf16be(self.value)
            utf16.slice!(0, Encoding::UTF16BE::BOM.size)

            utf16.encode("utf-8", "utf-16be")
        end
Convert String object to an UTF8 encoded Ruby string.