From b7200b739ff651a7647d2d666e3674a7fe3cb6e2 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 26 Mar 2012 15:11:39 +0000 Subject: fixed it_html::fix_encoding --- tests/it_html.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/it_html.t b/tests/it_html.t index c955359..a576b47 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -168,4 +168,16 @@ is( is(it_html::entity_decode("’"), "'"); is(it_html::entity_decode("࿿"), " "); is(it_html::entity_decode("ϧ"), " "); + +is(it_html::fix_encoding("Meier"), "Meier"); +is(it_html::fix_encoding("Müller"), "Müller"); +is(it_html::fix_encoding("Aslı"), "Aslı"); +is(it_html::fix_encoding("é»"), "é»"); + +is(it_html::fix_encoding(utf8_encode("Müller"), true), "Müller", "double encoded latin1"); # Double encoded latin1 +is(it_html::fix_encoding(utf8_encode("Aslı"), true), "Aslı"); # Double encoded non-latin1 +is(it_html::fix_encoding(utf8_encode("é»"), true), "é»"); # Double encoded special combination + +is(it_html::fix_encoding(utf8_decode("Müller"), true), "Müller"); # Incorrectly decoded latin1 + ?> -- cgit v1.2.3