Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi all,
we are trying to set up a CAD worker using the Generic Worker that uses a batch file that reads the xxx.in file, calls the converters and writes to the xxx.out the path to the resulting file.
Everything works until files with special characters are to be translated. The FTP copies over the files correctly but the xxx.in contains the name of the file incorrectly. In the _wcsjob.paj the filename contains the "ü" character but this is replaced in the in file with "@WT".
Both the Windchill server and the worker server is running windows server and we set the locale to be English (United states) (Initially it was German).
We set the publishing option in vws.properties: xconfmanager -s "publish.service.documents.options=encodefilename=true " -t /codebase/WEB-INF/conf/wvs.properties –p
but still no luck.
Any other ideas what could cause this issue?
Thank you,
Tamás
For CAD Documents European letters with accents, umlauts, and trémas are also not supported.
The option publish.service.documents.options is only for WTDocuments.
Hi all,
let me document what I found out and how I managed to get over this encoding problem.
The files are copied over with FTP with correct names in case of common used special characters in our region (äéáöüßÄÉÁÖÜ) so these were the characters that I tested my converter with.
The generic worker puts the file name encoded into the *.in file.
What I did is that I created a file with all the special characters that I wanted to handle + space character and found out the encoded value of each.
In my batch script (bat with ANSI encoding), after reading out the RUN command arguments I set the codepage to ANSI and decode the file name argument like this:
chcp 1252 >NUL
:decodeFile
set filename=%filename:@_= %
set filename=%filename:@VL=ä%
set filename=%filename:@VI=á%
set filename=%filename:@VQ=é%
set filename=%filename:@WT=ü%
set filename=%filename:@WN=ö%
set filename=%filename:@UT=Ü%
set filename=%filename:@TL=Ä%
set filename=%filename:@UN=Ö%
set filename=%filename:@TI=Á%
set filename=%filename:@TQ=É%
set filename=%filename:@UW=ß%
set filename=%filename:@@=@%
(If you know a better way please tell me)
Using this trick I get the correct file names to translate. The problem is that the output can't contain special characters because the worker can't load it back to the system. Because I didn't know any other solution I specified the encoded filename as output (output file name will be the original string from the *.in file).
All the best,
Tamás
Instead of using FTP, you can use a shared folder.