"\xe2" is one character in Perl. â
to be precise. But "\x0f4" are two
characters - it's equivalent to "\x0f" . "4".
And '\x0C8' are four characters. You probably
want "\x{1E80}" etc.
That doesn't solve the problem for tân though.
But then, you could have made other mistakes in the rest
of your program. But why don't you look which character is
actually in your HTML?