Skip to main content
1-Visitor
June 8, 2012
Solved

Translating ACL files

  • June 8, 2012
  • 1 reply
  • 2834 views

I'm working on a large scale project trying to repair and use our entire PTC project. I'm working on learning and maintaining aspects as far up as Windchill System Administration to as far down as stylesheet control. My company is using information from our mother plant in Japan, who sent us a version of their custom folder since ours wasn't tailored to their products. However, their acl files didn't translate over properly, so their comment lines are in gibberish and sometimes their command lines are off, too. I've put in support to PTC, requested translated files from Japan, contacted my own IT and scoured the internet for a way to correct this translation issue. This is critical for us, since many aspects of our project our stuck until we can understand what they did and how they did it. I think that this is something programmers run into often, and would know how to fix, but that's a guess and I don't know any programmers. Any help would be much appreciated. Thanks

I attached an example of my issue.

Best answer by ClayHelberg

Hi Bryon--

This is an encoding issue. The original file is in the home locale encoding for where it was written (Shift-JIS). But your machine is set to a different locale, so it's not able to read the file properly.

You can fix this by converting the file from Shift-JIS to UTF-8. You can do this by loading it into an encoding-aware text editor like jEdit (www.jedit.org), switching the encoding, and then saving in the new format. For example, I was able to convert your sample file in jEdit as follows:

1) Load file, get error about illegal characters

2) Select File-Reload with encoding->Shift-JIS

3) File reloads correctly, comments are readable (if you know Japanese)

4) Select Utilities->Buffer Options->Encoding, set to UTF-8

5) Save as, with new filename

The newly saved file should load OK in Arbortext 6.0 on machines configured for English.

If you have a lot of these to convert, you might want to look into scripting something. Most modern scripting languages have ways to set encoding on read and write of file content, so just slurp in the Shift-JIS content, and spit out UTF-8, and Bob's your uncle.

Hope that helps.

--Clay

1 reply

18-Opal
June 14, 2012

Hi Bryon--

This is an encoding issue. The original file is in the home locale encoding for where it was written (Shift-JIS). But your machine is set to a different locale, so it's not able to read the file properly.

You can fix this by converting the file from Shift-JIS to UTF-8. You can do this by loading it into an encoding-aware text editor like jEdit (www.jedit.org), switching the encoding, and then saving in the new format. For example, I was able to convert your sample file in jEdit as follows:

1) Load file, get error about illegal characters

2) Select File-Reload with encoding->Shift-JIS

3) File reloads correctly, comments are readable (if you know Japanese)

4) Select Utilities->Buffer Options->Encoding, set to UTF-8

5) Save as, with new filename

The newly saved file should load OK in Arbortext 6.0 on machines configured for English.

If you have a lot of these to convert, you might want to look into scripting something. Most modern scripting languages have ways to set encoding on read and write of file content, so just slurp in the Shift-JIS content, and spit out UTF-8, and Bob's your uncle.

Hope that helps.

--Clay

1-Visitor
June 19, 2012

Thank you very much. I can work on the translation issue, but this jumped me ahead a great bit. Bob is my uncle, how'd you know that?

18-Opal
June 19, 2012