carriage return/encoding issue

Houdini16
2014-02-12
2014-02-12
  • Houdini16
    Houdini16
    2014-02-12

    I have been using this program for a couple years now for doing post edit on GCODE for CNC milling machines. Now after a newer update (I believe)the output code has 1 issue.
    If I go down to a line, hit enter to add a new line of code, add the text, and save the file, it looks ok in Notepad++, In Windows Notepad it doesnt have the return, the new line I added and the previous are on 1 line (no carriage return). We just use standard notepad it is a ansi normal text document but without any extension ie no .txt, just blank, our CNC wont read it with a extension.
    I notice that Notepad++ defaults for new document is set to a UTF-8, Is this how it was before, IDK, it worked before, but not lately, something changed. I tried changing the default to ANSI, to resemble Notepad(win) but still doesnt work. When i look at the code in the CNC mill, where there is supposed to be a carriage return(new line added) instead there is a symbol, a black square with a circle in the middle. PLEASE help, this is for work and we use it all day, this program is much better than Notepad.

     
  • dail8859
    dail8859
    2014-02-12

    Try turning on the end of line characters so you can see what your file contains and what the newline has. Use View->Show Symbol->Show End of Line. I would assume its mixing DOS and Unix line endings.

     
  • Houdini16
    Houdini16
    2014-02-12

    Thanks for the tip, if I turn that on when I hit enter to add the new line of code it isnt adding the CR on the previous line, Also when I open Notepad++ (blank, no file)it now is set to windows/dos and ANSI, but when I open up the document it switches to UNIX, ANSI.

     
  • dail8859
    dail8859
    2014-02-12

    Any new documents will use the default setting from N++. When opening a document it will read the end of lines and determine its mode (in your case apparently the file has UNIX line endings from another person saving it incorrectly or checking it out of a source code repository).

    Open the file then do Edit->EOL Convertsions->Windows Format and then save it. Reopening the file again should now have Windows line endings.

     
  • Houdini16
    Houdini16
    2014-02-12

    Thanks for the help guys, something is fishy, Our 3D CAM software has an option upon creating code saved to a DOS ANSI text document, to open a editor upon completion to add post edits. For some reason it was opening up as UNIX ANSI in Notepad++, This POS CAM software keeps all the setting in its files, instead of keeping a users setting and files setting separate, I couldn't find any relation to a change in file output that would cause the problem all you can do is chnage the end extension, which is set to nothing, but for curiosity i opened a old CAM file of mine that i had no post issues with, and posted a new output from it, NP++ opened in dos/ansi. I then went back opened the previous problematic CAM file and re-posted, and now it changed from opening as UNIX to opening as Windows/dos. I dont know what going on (dropped code?)but at least I now know, that if NP++ says unix at the bottom i know how to convert it now, thanks guys.