i found the Byte-order mask only for these encoding,
"FF FE" UCS-2LE or UTF-16LE
"FE FF" UCS-2BE or UTF-16BE
"EF BB BF" UTF-8
but i got a strange Byte order Mask while writing some utf8 format text into a utf8 format file
this is the BOM i got "e4 b8 ad " after i wrote in that utf8 format file.
check it for BOM in this site http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_42jv.asp
the code i used is
use Encode; use Encode::HanConvert; $str8=gb_to_simp("中国的网页");#the str +ing inside this is chinese characters use utf8; open OUT,">:utf8","D:\\output1.doc" or print "could not open"; print "\n",utf8::is_utf8($str8),"\n\n\n"; print OUT $str8; close OUT; no utf8;
Anyone tell me why this is happening,
i am wrinting in utf8 format only.but the Byte order mask shows different.why? help me in that.
The actual Byte order mask for utf8 is "EF BB BF".

In reply to how to determine the text file encoding by uva

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.