Skip to content
Snippets Groups Projects
Commit c2fbd971 authored by Lars Kanis's avatar Lars Kanis
Browse files

Mark strings retrieved from fox as UTF-8 when running Ruby 1.9.

parent 502ce6d1
No related branches found
No related tags found
No related merge requests found
#encoding: utf-8
require 'test/unit'
require 'fox16'
require 'fox16/colors'
......@@ -93,4 +94,12 @@ public
assert_equal([8, 6, 8], endIndex)
end
if ''.respond_to?(:encoding)
def test_encoding
@text.text = "世界線航跡蔵"
assert_equal(Encoding::UTF_8, @text.text.encoding)
assert_equal('世界線航跡蔵', @text.text)
assert_equal('線航', @text.extractText(@text.text[0,2].bytesize, @text.text[2,2].bytesize))
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment