I have written a program that makes a concordance out of texts in the Wolof language. This language has acute grave accents, diaresis, and n tildes - all of which work fine. But the Wolof alphabet also include an n with a right backwards tail: ŋ. This is unicode 0143, utf8 C58B.
Every file with this code in it produces messages about
Wide character in print at conc.pl line 99, <FILE> line 198993.
and the output formatting is messed up for other lines. I am still looking at what this might be, but it only seems to uccur in the files with that character...
I am doing all the "right" things, I think.
My perl version is (revision 5 version 10 subversion 0)
My env has LANG=en_US.UTF-8.
My code has use utf8
My input is opened
open (FILE, "<:encoding(utf8)", $filename)
My output is STDOUT
I can get rid of the errors by using binmode STDOUT, ":encoding(utf8)"
but the output is still messed up.
Any clues gratefully received...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.