home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,494 of 42,547   
   sean to foxidrive   
   Re: change file encoding in batch file   
   15 Oct 16 19:54:00   
   
   From: sean@sean.eternal-september.org   
      
   On 10/15/2016 09:03 AM, foxidrive wrote:   
   > On 12/10/2016 09:40, sean wrote:   
   >   
   >> I have a need to change file encoding from whatever it is now to utf-16   
   >> and I'd like to do this programmatically without much hassle.   
   >>   
   >> Any pointers on changing the file type will be greatly appreciated!   
   >   
   > I'm not so clued up on UTF encoding but reading around it indicates that   
   > your files may have a BOM that you can check for.   
   >   
   > A BOM isn't mandatory and it would depend on the files you're processing   
   > to see if they all have one, and also the form of the BOM.   
   >   
      
   The company has a policy to use utf-16, no idea if that's BOM or not,   
   but there's no technical reason utf-8 can't be used. I first encountered   
   this problem when trying to parse the files with   
   http://xmlstar.sourceforge.net/   
      
   I may have been (and still should look into it) a method to see if   
   xmlstar can parse xml files regardless of the encoding. I think was   
   really upset it was that the file said it was a utf-16 file but the   
   encoding was utf8.   
      
   thanks,   
   sean   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca