#!/usr/bin/perl -w use strict; use utf8; my ( $codepoint, $test_string, ); binmode STDOUT, ":utf8"; $codepoint = ord('我'); print "Codepoint of character is $codepoint\n"; $test_string = "Here's a test string with 我\n"; print "test_string is $test_string\n"; $test_string_dec = decode('utf8', $test_string);