Message Areas - "txt2uni.exe .. Need help"
Train-Sim.Com Message Areas
"txt2uni.exe .. Need help"
Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
oboe (55 posts)
Feb-14-02, 10:58 PM (EST) "txt2uni.exe .. Need help" LAST EDITED ON Feb-14-02 AT 11:02 PM (EST)I have read the techdocs and searched the forums, and I guess I must be missing something real simple somewhere, or I am totally misunderstanding the purpose of the txt2uni file. I am trying to convert *.s files from ascii to unicodeNo matter what I do when I use the txt2uni command, I get a dos screen that flashes on the screen and is quickly gone.I am running it in the start/run window. I have placed the txt2uni.exe file in the C:/windows directory, and in a directory on D:/testarea. I have also placed several *.s files in the D:/testarea directory. The following command lines have been tried. d:/testarea/txt2uni d:/testarea/crates.s
d:/testarea/txt2uni.exe d:/testarea/crates.s
d:/testarea/txt2uni crates.s
txt2uni d:/testarea/truck1.s
txt2uni.exe d:/testarea/us2crossing2x.s
I have tried these lines with over 20 different shape files
and they remain in ascii ... I look at the *.s file both before and after the call with word97 and wordpad. There's never a change ... What am I missing here ? oboe Alert Edit | Reply | Reply With Quote | Top
Table of Contents
Subject Author Message Date ID RE: txt2uni.exe .. Need help pennsyfan2 Feb-15-02 1 RE: txt2uni.exe .. Need help oboe Feb-15-02 2 RE: txt2uni.exe .. Need help sniper297 Feb-15-02 3 RE: txt2uni.exe .. Need help oboe Feb-15-02 4
Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
pennsyfan2 (74 posts)
Feb-15-02, 00:37 AM (EST) 1. "RE: txt2uni.exe .. Need help" LAST EDITED ON Feb-15-02 AT 00:41 AM (EST)LAST EDITED ON Feb-15-02 AT 00:38 AM (EST)Two possibilities I can think of . Are the files sizes the same? converting to unicode will double the file size. Is that happening?Second you may have to give the command line a to directory or filename that is different from source.exa: d:\backslash? You're examples are showing the slashes going the this way /
d:\testarea\txt2uni.exe Source direstory\filename to directory\filename Why not just open the asci *.s file directly in Wordpad and save as a unicode txt file. Remove | Alert Edit | Reply | Reply With Quote | Top
oboe (55 posts)
Feb-15-02, 01:09 AM (EST) 2. "RE: txt2uni.exe .. Need help" LAST EDITED ON Feb-15-02 AT 01:15 AM (EST)I can't believe I had the slashes backwards ... I've been working with computers since the days of CPM ... Sheesh ... MSTS dyslexia (SP). Doesn't matter though, I still get the same results ...hmmm The techdoc says the following:
_____________________________________________________________
Text Format Shape Files
Note that all source text files for the conversion described below must be in Unicode text format. This is always the case for text format .w file, but shape files output by the Conv3DS utility are in ASCII text format. To convert a .s file output by this utility to Unicode text format, use the txt2uni command line utility. For example the following converts the file myshape.s from ASCII to Unicode text format (overwriting the file). Note that shape files need to be in Unicode text format in order to be loaded into Train Simulator.
txt2uni myshape.s
___________________________________________________________Does anyone know if this techdoc instruction is written correctly ?? Do ALL *.s files convert ?
P.S. Trying to "save as" had no effect, and the file sizes never changed.
oboe Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (1599 posts)
Feb-15-02, 08:20 AM (EST) 3. "RE: txt2uni.exe .. Need help" May be some confusion here. txt2uni converts to unicode, altho I haven't tried it yet you could probably open a text file in wordpad and save it as a unicode text file to do the same thing. Unicode is merely a type of formatting, adds the formatting characters to the file, and will actually make the file bigger than the unformatted text file. The next step for the shape file would be conversion from unicode (which is still in language readable by ordinary people like me) to binary (blocks, boxes, chicken scratchings, and a few %#&*#! curse words thrown in just for fun) for compression of the .s file. A shape file will load and run without compressing it, allegedly the advantage to the squished format that looks like chock-a-block soup in wordpad is that the sim loads it faster. ffeditc_unicode.exe is what converts the file from unicode to machine language, or back to English again, altho sometimes it don't work. Haven't quite figured that one out yet. Remove | Alert Edit | Reply | Reply With Quote | Top
oboe (55 posts)
Feb-15-02, 12:10 PM (EST) 4. "RE: txt2uni.exe .. Need help" Hi sniper:"some confusion" .. More like total confusion .. It is interesting to look at the shape files in unicode format because you can ALMOST learn something about how the object works. I am trying to understand how level crossings interact with the tracks so that I might find a way to use the routine to create a track crossing interlock signal. I have the binary to Unicode conversion figured out ok, but that took awhile to get right too. Example for the Hut1.s file ( first three lines of code only )
_____________________________________________________
Original binary format: ![]()
______________________________________________________
After using the ffeditc routine on it:SIMISA@@@@@@@@@@JINX0s1t______shape (
shape_header ( 00000000 )
volumes ( 3
_____________________________________________________The txt2uni file is intended to be used after converting a 3ds file into ASCII. Then txt2uni converts the ASCII to unicode so that the sim can use the file. ( Better in binary though ), but I like your "chock-a-block" description better. My problem is in understanding the results of the routine itself, and I think that you may have turned a very dim light on in my head when you said "merely a formatting change" ... Now it dawns on me that it is probably converting the file just fine, and that the formatting changes make no visible difference to the file in wordpad. I can't see a size difference because I'm using 1K shape files and Explorers resolution on file size is only 1K.Unfortunately, I can't tell whether it's toggling between ASCII and Unicode, or converts to unicode and stays there. Is there a way to tell whether the file is in ASCII or UNICODE format ??All of this doesn't really matter, I'm just curious as to how it really works. Pennsyfan2 has the key, just always use "save as" and select "unicode" when saving the file. ( Saving like that gives me an error code that says "all formatting will be lost", but the file must have saved in unicode because it will convert to binary, and works fine in the sim. )oboe
Remove | Alert Edit | Reply | Reply With Quote | Top
Lock | Archive | Remove
Lobby | Topics | Previous Topic | Next Topic
Restored from the Train-Sim.Com archive, captured March 9, 2002. About this archive.