Page 1 of 1 1
Topic Options
#118232 - 2004-04-19 05:05 PM Txt Ansi to Txt Unicode
schnazzy Offline
Fresh Scripter

Registered: 2000-07-12
Posts: 23
Loc: New York, NY USA
ok folks you haven't let me down to date, please help me out with this problem.
I have created a script for automation of an ini file modification with the following changes.
use writeprofilestring for first pst section.
use writeline for subsequent(yes Multiple) PST sections in the ini with same [section name]
problem i have is that i can only use wrteline to append ANSI formated ini file. Program that ini is used for only accepts Unicode formated INI file.
what can be done to convert the ini to Unicode format?
Anything?
_________________________
Jeff Lynch Network Administrator

Top
#118233 - 2004-04-19 05:28 PM Re: Txt Ansi to Txt Unicode
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I know of a neat DOS trick to convert UNICODE to ANSI, just TYPE the file and redirect > stdout to the new filename, but for going the other way, not aware of any tricks for that ... but this miniture cmdline util does the trick:

mtee

run it like this:

mtee <ansi.txt /U >unicode.txt

-Shawn

Here the full blurb on mtee.

Top
#118234 - 2004-04-19 10:18 PM Re: Txt Ansi to Txt Unicode
schnazzy Offline
Fresh Scripter

Registered: 2000-07-12
Posts: 23
Loc: New York, NY USA
Thanks, that did trick perfectly
_________________________
Jeff Lynch Network Administrator

Top
#118235 - 2004-04-20 12:10 AM Re: Txt Ansi to Txt Unicode
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I was hoping someone would offer a neat DOS trick to do this.
Top
#118236 - 2004-04-23 12:16 PM Re: Txt Ansi to Txt Unicode
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

I was hoping someone would offer a neat DOS trick to do this.




Your wish...
Code:
%COMSPEC% /U /C TYPE ascii_file.txt >unicode_file.txt


Top
#118237 - 2004-04-23 02:03 PM Re: Txt Ansi to Txt Unicode
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
hey hey - well done.
Top
#118238 - 2004-04-23 04:27 PM Re: Txt Ansi to Txt Unicode
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Quote:

/U - Causes the output of internal commands to a pipe or file to be Unicode




Ah ha! Thank you Richard... this was right under my nose, and so simple too. I've needed this for automating the selection lists in the W2K backup utility since the backup was expecting a unicode file. Nice Find!

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.034 seconds in which 0.016 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org