Yet another unicode question: windows platform



I'm still searching for the answer but I can't find it yet so maybe
someone can point me in the right direction. This is my problem... I'm
reading MS SQL Server errorlog file- sql7 and sql2000 are standard
ascii flat files that I can process with no problems. Then comes
SQL2005... now the file is in unicode format. After a lots reading
(web and perl docs) I ran across my answer...
http://blogs.msdn.com/brettsh/archive/2006/06/07/620986.aspx , the link
talks about writing but I was able to use the same concept to read the
file (open errorlogFH,"<:raw:encoding(UTF16-LE):crlf:utf8",
"$TempErrorlog";) which worked fine. BTW... the information from this
link was more helpful than the perldocs but maybe it just me :o

Now here is my issue that I'm sure is a no brainier for someone out
there... prior to my open, how can I check the file? Is it plain text
so that I can use the standard open OR is it unicode so that I know
that I need to use the "encoding" method?

Also if anyone knows of some good information that has worked for them
as it pertains to unicode, please post so that I can check it out.

Many thanks!
Terry

.



Relevant Pages

  • Re: Thousands of words on Ruby
    ... I found it interesting reading. ... I really like that Ruby leaves the power to decide where to store code in our hands. ... The idea is to adapt your language to the problem domain, so the solution is very naturally expressed in the language of the problem. ... I'm looking forward to your Unicode talk. ...
    (comp.lang.ruby)
  • Re: Unicode and MoinMoin
    ... I've spent hours reading about ... Unicode, and playing with different encoding/decoding commands, but at ...
    (comp.lang.python)
  • Re: Strange error in my html files...
    ... Claus Dragon the Admired Tiny Competitor of Pestilence wrote: ... UTF Bid Endian and Unicode. ... Yes on reading this I finally figured out how to do that on notepad. ...
    (rec.games.computer.ultima.dragons)
  • Re: Creating UNICODE filenames with PERL 5.8
    ... I seemed to prove this by reading the directory ... >> Do you know of a method of reading directories to get the UNICODE file ... > suffer the same problems. ... command lines to be specified in, ...
    (comp.lang.perl.misc)
  • Re: Creating UNICODE filenames with PERL 5.8
    ... It is obviously reading the filenames using the Unicode API, ... If you specify /u to cmd.exe, it sets the console output to UTF-16, which ... Once I added that command line parameter, ...
    (comp.lang.perl.misc)