Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Post Unable to Read Japanese

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
jrobersonJE6HW
406 Views, 10 Replies

Post Unable to Read Japanese

Good day.

I noticed that Fusion post cannot read "operation-comment" if they are in Japanese. 

I used Fusion in Japanese. And if I change all the toolpath names to English then it are given out in the post as usual.

If Japanese I get question marks or blanks instead. I know that there is operation-strategy, editting the post to say this versus the operation-comment will give out the english name without having to edit every single name of every toolpath in my CAM program. But I would really like to be able to included the Japanese names. 

The technical works in English are not well know by my users and has made it difficult to keep track of NC data as easily.

 

Any help with this? I currently code in SJIS as that is the only way to read the Japanese notes and characters. But if there a work around for getting the "operation-comment" to come out?

 

※No special post being editted, just standard OKUMA/FANUC posts.

 

See attached images. For example 2Dポケット(2) 2 gets turned into (2D 2 2). If english then no issues.

Then just the dump file showing the Japanese release.

 

Thanks for your time.

10 REPLIES 10
Message 2 of 11

I think it has something to do with ‘permittedCommentChars’ which defines what characters are permitted in the comments and other fields. You may have to add your alphabet to the permitted list

 


Seth Madore
Customer Advocacy Manager - Manufacturing
Message 3 of 11

Thank you for you reply. But I also tried this. This just gives me ??? marks as well. This was actually the first thing I thought of. I tried adding the alphabet characters in the permittedcharacters section copy and pasted directly from the dumb file, or even tried out normally. Neither worked.

Message 4 of 11

I even tried doing it this way, as you can see, it still doesn't give the Japanese. 

I'm pretty sure it has something to do with the way the Post Processes the data, probably as a UTF8/16 files therefore cannot translate the Japanese. 

Is there a way to force the post processor to read the data as SJIS instead of UTF8/16?

Message 5 of 11

Sorry for the 3rd reply, but as you can see, even if I add the exact japanese as written below in the permitted characters section I get question marks. Meaning the data is being read in a UTF8 form, I believe.

Message 6 of 11

setCodePage("ascii");

Every post indeed sets the encoding.

Check what yours sets, maybe changing this will help?

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 7 of 11

Thank you, @Laurens-3DTechDraw .

 

I changed "setCodePage" like this.

// setCodePage("ascii");
setCodePage("Shift_JIS");

 

After post-processing, the finished NC program is opened in VSCode, and when I switch the VSCode encoding to the same "Shift_JIS", the program is displayed correctly.

1.png

Since it is troublesome to switch the VSCode encoding every time, it is convenient to set the encoding by extension in advance.

https://note.affi-sapo-sv.com/vscode-save-encode-change.php#:~:text=%E8%A6%8F%E5%AE%9A%E3%81%AE%E6%9... 

 

In addition, I had thought that it was impossible to use Japanese characters in CPS files for many years because of an error during post-processing, but now I know that it is possible to display Japanese characters in post-processing properties.

・Open CPS file with VSCode
・Switch to the desired encoding
・Rewrite necessary characters into Japanese
・Save the file.

 

 

1.png

 

Perhaps this is effective not only for Japanese, but also for languages that use 2-byte characters.

Message 8 of 11
jrobersonJE6HW
in reply to: kandennti

Thank you for your reply. Actually, I've already tried this.
While yes, I can see the Japanese in the post properties within Fusion. I can't get it to read the toolpath names in Japanese and write them as comments in the post as proper Japanese. Even now I still get errors.

This edit also done with an otherwise uneditted copy from the post library (just to prove that this is occuring without any other edits).

Message 9 of 11

Well, actually, I tested this by actually throwing at out a post from Fusion with the setCodePage changed to Shift_JIS which actually gives me the correct Japanese, however, VSCode always gives me the above strange codes. But... hey I can live with that. Thank you.
Message 10 of 11
kandennti
in reply to: jrobersonJE6HW

@jrobersonJE6HW .

 

I think the garbled characters are due to the different encoding.

Wouldn't the NC program after post-processing also display correctly if the encoding is the same as when the CPS file was edited?

Message 11 of 11
jrobersonJE6HW
in reply to: kandennti

I think because the Autodesk Library "export CNC to VS Code" file is most likely set in "ascii" it causes errors when trying to check coding through the debugging extension in VSCode. But when I use the post and actually process it to spit out NC data, it comes out in Japanese just fine. I don't usually go through Fusion to push out a code with a post processor until the debugger gives me decent results. I assumed the garbled letters where the code not working when I tried this previously on my own.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report