How to fix Non ANSI Characters

datsunstz

New member
Hi

I have come across some assests that have an error that states 'The texture file "black.texture.txt" contains non ANSI-characters. Textures must be ANSI'
Can some please help me fix these or tell me a solution for the problem as I have quite a few assests with the same problem. I am running Trainz 2012 with CMP 3.6

Thanks,
Harry
 
Trainz only recognises the ANSII character set, which Google will turn up for you. The ANSII set is ideally suited to English based languages, is somewhat wanting with many European language characters and is completely hopeless for Cyrillic characters, which is why most Russian content is called ?????????-????????? (literally - check if you are in doubt!). As you can see the native languages of a huge proportion of the Trainz community are not recognised.

Trainz used to be 'universal', but that changed with the introduction of CM, I suspect to simplify searching and sorting.

Long answer to a short question, but basically you have to 'Anglify' whatever characters in each particular asset are causing offence.....
 
The process is fairly easy if you are familiar with using a hex editor. If not, then either learn how to use a hex editor NOT on your precious Trainz model or heave a sigh and leave well alone.

OK stage 1, download the cdp using FTP; if it off a third party site it will already be as a stored CDP or already unpacked.

Stage 2. Import into Trainz and note the names of the problem textures.

Stage 3 Work on a copy of the CDP

Stage 4 Open your copy in the hex editor and search for the problem names. When you find them change the accented character to the same normal unaccented Anglo Saxon character(the name becomes meaningless but Trainz is too stupid to care)

Stage 5 Save your work.

Stage 6 Delete the problem item in Trainz and import your copy CDP. You will still get an error but don't worry.

Stage 7 Open the item in Explorer and open the .im/.pm file in the hex editor and repeat stage 4 (the mesh file is encoded in the CDP so you can't do it there). The changed letter Must be the same as in Stage 4.

Stage 8 Recommit (CTRL+M) and the errors should have disappeared. You may now find you have other errors but that is a different story dealt with in ways described elsewhere.

Remember only do a one for one swap in the hex editor or you will corrupt the file. Hence the need to use a copy.
 
Last edited:
Back
Top