Hello Guest it is March 28, 2024, 10:04:41 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - taylorgwood

Pages: 1
1
G-Code, CAD, and CAM discussions / Re: G-Code bad character used
« on: June 28, 2019, 08:02:07 PM »
I created a foil pattern for an electronic circuit in Eagle, sent the gerber file to copper cam on line, and received the attached g-code. When I loaded it up in Mach 3, get the error of bad character used and can see it in my Mach 3 code window. But when I open it in note pad, hippo edit, or multi-edit, am at a loss to display them. If I delete a line of comment, reload it into Mach 3, it just shows up on the first line. Any ideas what the problem is? I've attached the gcode file and a screen capture of the Mach 3 window.

This is what I found the problem could be, along with a solution:
- The bad block of code at the start of the file is the following symbols: , which have the following Alt codes: 0239 0187 0191
- These alt codes are also the symbol's decimal representation. In hex, they are: EF BB BF
- Doing some internet searches shows that this string of code is the 'byte order mark' (BOM) for UTF-8 encoded files. (see https://en.wikipedia.org/wiki/Byte_order_mark)
- So apparently you are editing and saving a UTF-8 type file, whereas Mach3 is reading it as an ANSI type file.
- I don't know tons about this, but in summary Mach3 interprets the UTF-8 BOM as the 3 symbols () because it is reading in ANSI. The problem, I think, is on the Mach3 end because it would have no error if it could read higher-level encoded files and thus recognize the BOM.
- To fix this, make sure the type of file you are using in Mach3 is an ANSI file, not another encoding option.
- You can save the file as an ANSI-type file in Notepad (File>>Save As>>select ANSI file type).

Hope this helps someone in the future.

Pages: 1