# the set of 256 characters which is usually called Latin1. However, they
# will work properly with any character input, not just Latin1.
-sub native_to_latin1($) {
+sub native_to_uni($) {
my $string = shift;
return $string if $::IS_ASCII;
return $output;
}
-sub latin1_to_native($) {
+sub uni_to_native($) {
my $string = shift;
return $string if $::IS_ASCII;
my $output = "";
for my $i (0 .. length($string) - 1) {
- $output .= chr(ord_latin1_to_native(ord(substr($string, $i, 1))));
+ $output .= chr(utf8::unicode_to_native(ord(substr($string, $i, 1))));
}
# Preserve utf8ness of input onto the output, even if it didn't need to be
# utf8