Community
    • Login

    I need to convert about 1500 files from ANSI to UFT8

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 1 Posters 2.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Joaquim PonteJ Offline
      Joaquim Ponte
      last edited by

      Hi,
      I’ve tried a solution using macros i’ve found in stack overflow (i’ve pasted it below) but when i apply it, all files are overrided with last clipboard before running the macro! It seems that this is a npp bug but even doing the workaround (select all+ copy during recording), the problem remains :(
      I’ve tried with several releases of npp (6.6.?, 6.8.8 and 6.9.2) without success.

      Has somebody the same problem? Is there a solution?

      Thank you!

      HERE THE MACRO:
      Convert the currently opened file to UTF-8 w/o BOM;
      Select all the text in your file, and copy it (why this? it looks like a bug. if you won’t do this, your file will be replaced with your current clipboard content…);
      Save the current file;
      Close the current file.
      Save this macro.

      Now, open your PHP files, and run it with the “Run a Macro Multiple Times…” command. If you opened 100 files, let it run for 100 times.

      1 Reply Last reply Reply Quote 0
      • Joaquim PonteJ Offline
        Joaquim Ponte
        last edited by

        No matter.
        Solved it using PythonScript:
        https://pw999.wordpress.com/2013/08/19/mass-convert-a-project-to-utf-8-using-notepad/

        Thank you!

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors