Get notepad to default save to utf-8?

by Lloyd Buchinski 13 replies
Is there a way to do that? By default ANSI is always selected and it has been a worry for me that sooner or later I will miss selecting utf-8 and the sheet will screw something up on a site. In addition I can't tell how they are saved. If I right click on a sheet and select properties, neither of those options are ever mentioned.

I don't even know what ANSI is and have never used it, but I assume it's one of their formats that MS wants to push even though no one uses it on the web but them? It's a complete pain in the neck to steer around it for every single notepad page.
#website design #default #notepad #save #utf8
Avatar of Unregistered
  • Profile picture of the author mywebwork
    ANSI is an acronym for the American National Standards Institute, an organization that has been around since 1916 - far longer than Microsoft. Despite the name ANSI standards are used worldwide. You can learn all about this organization at American National Standards Institute - ANSI.

    All of your Notepad settings are in the Registry at [HKEY_CURRENT_USER\\Software\Microsoft\Notepad\]. I believe the setting for UTF/ANSI is the ifCharSet parameter but don't quote me on that.

    Your best bet is to add the DWORD parameter fSavePageSettings=1 to your Notepad registry entry. This will cause Notepad to save your settings on exit.

    Personally I've never been concerned with the character set, my biggest complaint about Notepad is it's insistence on saving everything with a .txt extension. The previously mentioned DWORD hack will resolve this.

    Bill
    {{ DiscussionBoard.errors[621111].message }}
    • Profile picture of the author Lloyd Buchinski
      N7, thanks for the suggestion. I was thinking of using another editor and will check that one out also.

      Originally Posted by mywebwork View Post

      Your best bet is to add the DWORD parameter fSavePageSettings=1 to your Notepad registry entry. This will cause Notepad to save your settings on exit.

      Personally I've never been concerned with the character set, my biggest complaint about Notepad is it's insistence on saving everything with a .txt extension. The previously mentioned DWORD hack will resolve this.

      Bill
      Thanks for the ANSI info Bill.

      Notepad always does prompt for saving on exit and that is fine. I guess there are just so many different kinds of people. The txt extension has never even seemed like a problem to me. I just change it to html. At least it is quite obvious and if I do forget the first time I try to open it it is obvious what is wrong.

      I don't have much of a memory. Fortunately I have dealing with that it down to a system now. The only thing I have to remember is that I am going to forget, so do it now, make a prominent reminder, or try to put up a safeguard, which is what I'm trying to do here.

      Even without a memory problem I would still be concerned about this. Just get a little too speedy one day and forget that one step to save as utf-8 and there are problems coming.

      I haven't looked at other text editors for a year or 2 and at that time UltraEdit seemed to have the highest ratings followed by notepad++. I hate to get one for just this one little problem though because it might not be good when I finally do need one to do something else.

      UE turned out to be clunky for what I needed when I tried it out and I was really glad I was on the free trial. At the time I needed to compare nearly identical files for any differences. It turns out Word 07 is spectacular at this compared to UE.
      Signature

      Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

      The KimW WSO

      {{ DiscussionBoard.errors[624326].message }}
    • Profile picture of the author beezaah
      Personally I've never been concerned with the character set, my biggest complaint about Notepad is it's insistence on saving everything with a .txt extension.

      Bill[/quote]


      Changing the registry can have some far reaching consequences for some users; especially those who are using complex programs on their computers. Ensuring that NotePad does not place an extension on your document name is simple and REQUIRES NO REGISTRY CHANGES:

      Just click [SAVE AS] and place the file name in quotes like this:

      "yourfilename" ...then click save.

      This will exclude the file extension. If you need to remind yourself of the file type for future use, be sure to place a clue in the filename!

      Examples: "yourtxtfilename" "yourdocfilename"

      Cheers!
      {{ DiscussionBoard.errors[924191].message }}
  • Profile picture of the author n7 Studios
    Programmer's Notepad is freeware and quite highly regarded. Should give you the necessary defaults for saving text files etc. as UTF-8.

    Not exactly the solution to your problem, but hopefully a start.
    {{ DiscussionBoard.errors[621955].message }}
  • Profile picture of the author mywebwork
    Hi Lloyd

    I guess it depends upon what you need an editor for - I edit a lot of PHP, HTML and SQL and personally I like Ultra Edit. As I use a lot of computers and can't afford to license UE for all of them I usually use PS Pad, an open source editor that I also like a lot.

    editor PSPad - freeware HTML editor, PHP editor, XHTML, JavaScript, ASP, Perl, C, HEX editor

    If you're editing website content then Word would be OK (or Open Office), however I can't see using it for code - in fact it would probably add formatting characters and mess it all up. Notepad will work but its really best for small snippets of code and for playing with the text in your clipboard.

    I'm curious as to where you ran into the UTF-8 issue, sounds like you were doing more than just adding some AdSense code or editing a configuration file? I don't ever recall that being an issue for me, and I've used Notepad since Windows 3.1. Again, just curious.

    Bill
    {{ DiscussionBoard.errors[626584].message }}
  • Profile picture of the author Lloyd Buchinski
    Bill-

    The word thing is a bit complicated. I was thinking of opening 2 notepad sheets if I need to compare them, open 2 Word sheets, paste one notepad sheet into each word sheet to just find the differences. Then correct them on the notepad sheets and destroy the word sheets. Haven't tried it yet and don't even know if that would work.

    And oh oh, it looks like I'm going to learn something from a direction I didn't expect. I'm not actually doing anything sophisticated at all with code, more on a pretty basic level. I've been using a couple of css and xhtml pages and modifying them for my pages. In the head is this: <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

    I understand that I have to save notepad pages as utf-8 for them to work, and I just assumed that this must be common, but it suddenly sounds like it isn't. What do you normally save your html and css pages as? Is this pretty unusual for website pages? I haven't actually checked out a lot of website source codes at all. I just got a couple of books and got to work.

    So I'm glad that your last post had that little clue and this communication is progressing.

    thanks for taking the time so far, lloyd
    Signature

    Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

    The KimW WSO

    {{ DiscussionBoard.errors[629921].message }}
  • Profile picture of the author mywebwork
    Hi Lloyd

    If you're writing strictly English language pages you probably don't need to worry, all of your basic text and numerical characters are equivalent in ANSI and UTF-8. The ANSI character set is derived from the original ASCII character set, it's only 8 bits and primarily supports an English character set.

    The statement in the meta tag is intended for the web browser that is interpreting the page. The statement describes what type of document it is and what type of content it contains. If you were to dissect a Word or Excel document you would find a similar statement indicating the type of document you were dealing with.

    For purposes of editing HTML, PHP and CSS documents I'd still recommend a dedicated text editor, one that "understands" those languages. These editors (Ultra Edit, PS Pad, Notepad + and others) will use colors to separate tags and code from content, making the document easier to edit. But Notepad will still suffice, although for anything longer than a few lines of code it's considered to be cruel and unusual punishment!

    Bill
    {{ DiscussionBoard.errors[630049].message }}
    • Profile picture of the author Lloyd Buchinski
      Originally Posted by mywebwork View Post

      The statement in the meta tag is intended for the web browser that is interpreting the page. The statement describes what type of document it is and what type of content it contains.
      The part of this that worries me is if you declare utf-8 in the head and then serve up ANSI won't ie do something funny like go into quirks mode?

      I did just try to validate a page that validated as utf-8, and it did also validate after I saved it as ANSI even though it still had utf-8 in the head, so maybe it doesn't make much of a difference. Maybe I'll just look for a stripped down head that declares hardly anything.

      Maybe I'll change my forum user name to baffled while I'm at it.
      Signature

      Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

      The KimW WSO

      {{ DiscussionBoard.errors[637414].message }}
  • Profile picture of the author Lloyd Buchinski
    So just in case anyone else was remotely interested (pardon the dead thread revival) I found a couple of free text editors that let you choose the default encoding. Notepad++ is the bigger name and it is really simple with it. Just click on format and from the list select "encode in utf-8." Don't have to worry about it again.

    And came across this neat review page of text editors.
    35 Useful Source Code Editors Reviewed | Developer's Toolbox | Smashing Magazine
    Signature

    Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

    The KimW WSO

    {{ DiscussionBoard.errors[772570].message }}
  • Profile picture of the author tazosmr
    [DELETED]
    {{ DiscussionBoard.errors[7993874].message }}
    • Profile picture of the author RobinInTexas
      Originally Posted by tazosmr View Post

      Nothing like digging up a thread that's been dead almost 4 years and providing useless information to get your post count up.
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[7994734].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by RobinInTexas View Post

        Nothing like digging up a thread that's been dead almost 4 years and providing useless information to get your post count up.
        However, there is a "divine providence" that deletes such posts and his post count number will never increase... :p
        Signature

        {{ DiscussionBoard.errors[7995354].message }}
  • Profile picture of the author jpweb
    I am a big fan of Sublime Text2 With all the macros, snippets and plugins you can really customize it to how you code, how it saves files, and syntax highlighting. Sorry I can't help you with notepad, I stopped using that years ago.
    {{ DiscussionBoard.errors[7994494].message }}
  • Profile picture of the author jpweb
    Wow! Didn't even notice. ::facepalm::
    {{ DiscussionBoard.errors[7994740].message }}
  • Profile picture of the author tazosmr
    [DELETED]
    {{ DiscussionBoard.errors[8417808].message }}
Avatar of Unregistered

Trending Topics