http://qs321.pair.com?node_id=178366


in reply to Re: files saved in unicode are not being read correctly
in thread files saved in unicode are not being read correctly

Thanks for your help kurt. I need one more help.

In my application I get the list of files to open from the glob function.

so before opening the file I should know whether to use Unicode::Map or the normal mode (depending on whether the file is saved in acsii or unicode.)

Is that possible to do as well? what will be the impact if I use Unicode::Map for all files returned by the glob function?

thanks for your help.

regards,
Abhishek.
  • Comment on Re: Re: files saved in unicode are not being read correctly

Replies are listed 'Best First'.
Re: Re: Re: files saved in unicode are not being read correctly
by Courage (Parson) on Jun 30, 2002 at 15:29 UTC
    There's no 100% solution to your question, because even Unicode file may be considered as binary or even ascii.

    AFAIK usually unicode file starts with "\xFE\xFF" or "\xFF\xFE" but this is not always true.

    If a file is created by your own program, then, for example, use a special naming system, for example unicode text files let have an extension ".utxt" and ascii files just ".txt"

    Courage, the Cowardly Dog.

Re: Re: Re: files saved in unicode are not being read correctly
by amphiplex (Monk) on Jun 30, 2002 at 15:04 UTC
    sorry, I cannot answer this, anyone else ?

    ---- kurt