Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. how to restore old sources with Windows characters

how to restore old sources with Windows characters

Scheduled Pinned Locked Moved The Lounge
visual-studiotutorialquestion
8 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • E Offline
    E Offline
    Erhy
    wrote on last edited by
    #1

    Hello! I opened a old project and some source files with VS . If the files was written with Windows characters eg. "Windows: Western" an alert said that this file is now restored. But the characters with codes above x7f are marked as unknown characters. Do somebody know a tool to convert such files to Unicode without loss of the meaning of such characters? Thank you Erhy

    J 1 Reply Last reply
    0
    • E Erhy

      Hello! I opened a old project and some source files with VS . If the files was written with Windows characters eg. "Windows: Western" an alert said that this file is now restored. But the characters with codes above x7f are marked as unknown characters. Do somebody know a tool to convert such files to Unicode without loss of the meaning of such characters? Thank you Erhy

      J Offline
      J Offline
      Jorgen Andersson
      wrote on last edited by
      #2

      You can use Notepad++ to convert a file to a different codepage. And next time you have a question, there are better forums than the Lounge for that.

      Wrong is evil and must be defeated. - Jeff Ello

      E 2 Replies Last reply
      0
      • J Jorgen Andersson

        You can use Notepad++ to convert a file to a different codepage. And next time you have a question, there are better forums than the Lounge for that.

        Wrong is evil and must be defeated. - Jeff Ello

        E Offline
        E Offline
        Erhy
        wrote on last edited by
        #3

        I need a tool which searches for sources and other text files and convert them to Unicode with BOM, and leave the modification time. I think, the new convention, where text files without BOM are processed as UTF-8 encoded will cause much work for million of peoples. Erhy

        C 1 Reply Last reply
        0
        • E Erhy

          I need a tool which searches for sources and other text files and convert them to Unicode with BOM, and leave the modification time. I think, the new convention, where text files without BOM are processed as UTF-8 encoded will cause much work for million of peoples. Erhy

          C Offline
          C Offline
          CHill60
          wrote on last edited by
          #4

          As Jorgen suggest, try Notepad++ - it can be used from the command line. Or write a python script or powershell etc. A simple search came up with - Notepad++ Open file, change encoding and save from command line - Stack Overflow[^] - Converting text file to UTF-8 on Windows command prompt - Super User[^]

          E 1 Reply Last reply
          0
          • C CHill60

            As Jorgen suggest, try Notepad++ - it can be used from the command line. Or write a python script or powershell etc. A simple search came up with - Notepad++ Open file, change encoding and save from command line - Stack Overflow[^] - Converting text file to UTF-8 on Windows command prompt - Super User[^]

            E Offline
            E Offline
            Erhy
            wrote on last edited by
            #5

            Thank You! I will try it after Chistmas. Erhy and I wish you Merry Christmas!

            1 Reply Last reply
            0
            • J Jorgen Andersson

              You can use Notepad++ to convert a file to a different codepage. And next time you have a question, there are better forums than the Lounge for that.

              Wrong is evil and must be defeated. - Jeff Ello

              E Offline
              E Offline
              Erhy
              wrote on last edited by
              #6

              Do you know, how to detect old Windows coded text files? How Visual Studio detect them? Thank you for advice Erhy

              J 1 Reply Last reply
              0
              • E Erhy

                Do you know, how to detect old Windows coded text files? How Visual Studio detect them? Thank you for advice Erhy

                J Offline
                J Offline
                Jorgen Andersson
                wrote on last edited by
                #7

                I usually just simply open them in vanilla notepad and check what encoding it autodetected. This autodetection isn't perfect though, but still one of the best. VS also has an autodetect built in. I don't know how it works though.

                Wrong is evil and must be defeated. - Jeff Ello

                E 1 Reply Last reply
                0
                • J Jorgen Andersson

                  I usually just simply open them in vanilla notepad and check what encoding it autodetected. This autodetection isn't perfect though, but still one of the best. VS also has an autodetect built in. I don't know how it works though.

                  Wrong is evil and must be defeated. - Jeff Ello

                  E Offline
                  E Offline
                  Erhy
                  wrote on last edited by
                  #8

                  Now I have written Powershell scripts to automate the conversion from ANSI to UTF-8 See here

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups