Import text MacRoman, WindowsLatin1 and Unicode

erne ernestogiannotta at tiscalinet.it
Tue Sep 21 09:51:25 CDT 2004


Hi Olivier,

on 21-09-2004 8:10, olivier at vidal_olivier at yahoo.fr wrote:

> I need to make a module of import of text file for my program.
> In this module the customer has to clarify if the text file is of
> origin PC or Mac.
> What allows me to settle the encoding (windowsLatin1 or MacRoman).
> Classic.
> 
> But how do you make if the file to be imported is of origin Unicode Mac
> or Pc ? utf8 or utf16 ?
> It is necessary to ask to the customer if its file is of origin PC, Mac
> or Unicode (utf8 or utf16 ?) ?
> There is not a simpler solution ?
> 

some UTF files have a BOM header that identifies the type of unicode they're
in, but unfortunately not all have this signature and you must either guess
(e.g. if a file contains chr(0)'s it's likely to be an UTF16) or ask


Cool Runnings,
Erne.

-- 
| e r |  Ernesto Giannotta
| n e |  Musical Box - a media store
                   




More information about the Valentina mailing list