Perhaps a few points of clarification would help us help you.

I assume from what you say that the blackbox character shows up when you print to a file and then view that file on the screen. Yes? So what are you using to view the file?

I suspect that the right character is in the file and that it just isn't displaying as you would like with whatever tool you are using to view the file. So my next question is: Is it really important to your project that you be able to view the file on screen, or were you just viewing the file to confirm what is in it?

Since you have successfully printed the character directly to the screen, have you tried writing a simple program to read the file and print it to the screen? That would help confirm for you whether the char has properly been written to the file.

Bottom line: what is your goal? If it is to create a file that can be viewed on the screen, you will have to write, find, or configure a tool to do that. If it is to create a file for use in some other way, ignore the little black character and proceed to the next step in your program...

Edit 2001-03-22 by tye to close <u>


In reply to Re: special character printed on screen but not to file by dvergin
in thread special character printed on screen but not to file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.