Author Topic: using Notepad++ in ASCII mode  (Read 26952 times)

0 Members and 1 Guest are viewing this topic.

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
using Notepad++ in ASCII mode
« on: April 27, 2015, 07:47:08 PM »
I'm using Notepad++ to edit a cron job, however there doesn't seem to be an option in my version of Notepad++ to use ASCII encoding. Where can I enable it?
Ann-Marie
Beamsville, Ontario, Canada

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: using Notepad++ in ASCII mode
« Reply #1 on: April 27, 2015, 07:54:44 PM »
Try:
VIEW > Show Symbol > Show All Characters

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: using Notepad++ in ASCII mode
« Reply #2 on: April 27, 2015, 07:57:58 PM »
And you can also try some plugins, one can convert between HEX and ASCII for example. Just look in your Plugin manager.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: using Notepad++ in ASCII mode
« Reply #3 on: April 27, 2015, 07:58:49 PM »
Set the encoding to ANSI

You can turn on View, Show Symbols, Show End Of Line to make sure that only LF appears (not CRLF which will cause cron or bash to choke).

If you find both CR LF at the ends of the lines, there's an easy fix.  Use Search, Replace

Find: \r\n
Replace: \n
select Extended Search mode, and replace all.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: using Notepad++ in ASCII mode
« Reply #4 on: April 27, 2015, 08:00:30 PM »
Thank you, Jachym :)
Ann-Marie
Beamsville, Ontario, Canada

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: using Notepad++ in ASCII mode
« Reply #5 on: April 27, 2015, 08:01:02 PM »
Thanks, Ken :)
Ann-Marie
Beamsville, Ontario, Canada

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: using Notepad++ in ASCII mode
« Reply #6 on: April 27, 2015, 08:45:10 PM »
Set the encoding to ANSI

You can turn on View, Show Symbols, Show End Of Line to make sure that only LF appears (not CRLF which will cause cron or bash to choke).

If you find both CR LF at the ends of the lines, there's an easy fix.  Use Search, Replace

Find: \r\n
Replace: \n
select Extended Search mode, and replace all.
Best regards,
Ken

Ken, that's exactly how I fixed my bash cron routine the other day after I screwed the file up trying to edit it with my HTML editor! Worked like a charm.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849