Author Topic: Saving file as UNIX/MaxOS not right.  (Read 3303 times)

PiezonTM

  • Senior Community Member
  • Posts: 123
  • Hero Points: 7
Saving file as UNIX/MaxOS not right.
« on: May 30, 2014, 04:52:14 pm »
I have a file that has Unix file formatted lines (0xA), then a couple of lines with DOS formatting (0xD,0xA) got in the file as well.  In older versions of SE I could do a "Save as" and select Unix file formatting and it would fix the problem and convert all lines to Unix file formatting.  I've used 2012 and 2013 and seem this behaviour.  Is this a problem or expected behaviour?


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4965
  • Hero Points: 410
Re: Saving file as UNIX/MaxOS not right.
« Reply #1 on: June 01, 2014, 11:39:33 pm »
Line ending conversions don't work for files with a mix of line endings. You can do a regular expression search and replace to remove all 13 characters. From the SlickEdit command line "c/\x0d//r" will do the trick.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4965
  • Hero Points: 410
Re: Saving file as UNIX/MaxOS not right.
« Reply #2 on: June 02, 2014, 12:45:56 am »
There's another trick for solving this specific file format problem and you may have stumbled on it in the past. If SlickEdit interprets the file as a DOS file (first line ends with CR LF), then if you have a mix of CR LF and just LF lines, you can convert the all lines to either DOS or Unix line endings.

You can force SlickEdit to interpret the file as a DOS file using the open dialog. Make sure you don't already have the file open. Then use the Save dialog to convert the file.

PiezonTM

  • Senior Community Member
  • Posts: 123
  • Hero Points: 7
Re: Saving file as UNIX/MaxOS not right.
« Reply #3 on: June 02, 2014, 03:45:37 pm »
Thanks for the suggestions.  I tried a small test by converting a file to DOS formatted line endings using Geany, then tried the R-E search and replace.  I found this did not work in Windows, but does in Linux.  After a closer look it seems the Linux version will prompt and ask if you want to continue from the beginning, "End of file reached. Continue searching at the beginning".  Whereas in Windows it never give you the prompt.  I then retested in Windows starting from the top of the file and it worked fine. 

Also, I swear this conversion on the save used to work ~2007/2008.  I think it is also assumed that the "Save as" option for selecting the format would force a conversion of the line endings.  If no conversion is made, then what is the point of having this option for a "Save as" feature?

Thanks for the support.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4965
  • Hero Points: 410
Re: Saving file as UNIX/MaxOS not right.
« Reply #4 on: June 02, 2014, 04:16:44 pm »
This specific EOL problem can be fixed simply in the SlickEdit save code (changed for v19) by forcing the UNIX input file to be interpreted as a DOS file if EOL translations are specified. It won't help other situations though.

Arkhias

  • New Community Member
  • Posts: 2
  • Hero Points: 0
Re: Saving file as UNIX/MaxOS not right.
« Reply #5 on: June 12, 2014, 08:23:31 pm »
Is there any update on the Qt Mac OS X Mavericks crashes?

Have lost work several times because I forgot and clicked a hidden tool window :(

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Saving file as UNIX/MaxOS not right.
« Reply #6 on: June 12, 2014, 08:52:38 pm »
@Arkhias
What version are you currently using? The latest for the Mac is version 18.0.3.3. It does solve a lot of the Mac crashes we saw in Mavericks. Unfortunately it doesn't fix ALL cases where auto-hidden tool window tabs are clicked on. (Doesn't happen near as much, but it still does occur when really hammering on the auto-hidden tabs.)

The 2014 version, which we hope to have in Beta at the end of this month (or early July) has a completely new tool window architecture (including auto-hide).

Arkhias

  • New Community Member
  • Posts: 2
  • Hero Points: 0
Re: Saving file as UNIX/MaxOS not right.
« Reply #7 on: June 13, 2014, 11:44:40 am »
Ahh yep, it's the auto-hide windows that crash occasionally clicking them (using v18.0.3.3).

Sounds promising on the new version - are the betas generally available or, is there some sort of sign-up process? (Currently use a corporate license server).

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Saving file as UNIX/MaxOS not right.
« Reply #8 on: June 13, 2014, 01:48:28 pm »
When we have the betas available, we'll announce them here on the forums, along with details on where to download them from. And we'll have time-limited beta license files that you'll be able to install locally.