w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why perl cannot show all types of UTF8 characters

Are you looking at the output of your program on a console or in an editor?

Even if your program is generating the correct character codes for the symbols you want, you have to be using a font that supports those symbols to display the text; otherwise the display won't make sense.

It can be useful to open a text file using your browser, as web browsers have to accommodate pretty much any official encoding, and will usually be able to render the contents of your file correctly.

A quick search found this list of fonts that support the IP symbols. If you use one of those then you should be able to see your output properly.

I highly recommend GNU Unifont, which has the best coverage of the Unicode character set of any font that I know. It's a sans-serif font.


Update

It worries me that your your definition of the %IPAchar hash has multiple keys in set to the null or empty string "". It's a perfectly valid hash key, but the nature of hashes means that you can have only one element with that as a key. Officially, the value of the hash element $IPAchar{''} is undefined in this situation. In practice it will be set to the last value in the list that has the same key, so in your case $IPAchar{''} = 'h'.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.