Robocopy unilog output is gibberish












9














I tried to get robocopy in Windows 7 to generate a Unicode log, since I have files with Unicode characters. The command I used:



robocopy C:mysource D:mydest /mir /unilog:backup.log /tee


File the copy works and the onscreen output is correct, the log file itself just contains gibberish. This is regardless of whether I use the Command Prompt or the Powershell.



What gives? Am I doing something wrong?










share|improve this question






















  • This is also my experience. Did you find a solution?
    – André Caron
    Jun 3 '12 at 16:49
















9














I tried to get robocopy in Windows 7 to generate a Unicode log, since I have files with Unicode characters. The command I used:



robocopy C:mysource D:mydest /mir /unilog:backup.log /tee


File the copy works and the onscreen output is correct, the log file itself just contains gibberish. This is regardless of whether I use the Command Prompt or the Powershell.



What gives? Am I doing something wrong?










share|improve this question






















  • This is also my experience. Did you find a solution?
    – André Caron
    Jun 3 '12 at 16:49














9












9








9


1





I tried to get robocopy in Windows 7 to generate a Unicode log, since I have files with Unicode characters. The command I used:



robocopy C:mysource D:mydest /mir /unilog:backup.log /tee


File the copy works and the onscreen output is correct, the log file itself just contains gibberish. This is regardless of whether I use the Command Prompt or the Powershell.



What gives? Am I doing something wrong?










share|improve this question













I tried to get robocopy in Windows 7 to generate a Unicode log, since I have files with Unicode characters. The command I used:



robocopy C:mysource D:mydest /mir /unilog:backup.log /tee


File the copy works and the onscreen output is correct, the log file itself just contains gibberish. This is regardless of whether I use the Command Prompt or the Powershell.



What gives? Am I doing something wrong?







unicode robocopy






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 11 '11 at 22:57









miro

46112




46112












  • This is also my experience. Did you find a solution?
    – André Caron
    Jun 3 '12 at 16:49


















  • This is also my experience. Did you find a solution?
    – André Caron
    Jun 3 '12 at 16:49
















This is also my experience. Did you find a solution?
– André Caron
Jun 3 '12 at 16:49




This is also my experience. Did you find a solution?
– André Caron
Jun 3 '12 at 16:49










7 Answers
7






active

oldest

votes


















5














Bug in XP27. Try downgrade to XP26.



It appears to be a bug in the XP27 version of RoboCopy (which comes with Windows 7).



In version XP26 (which comes with Windows Vista) /UNILOG produces a perfectly readable Unicode log file for me.



If you don't have a copy of Vista laying around EasyRoboCopy also comes with the XP26 version. (I haven't actually tried EasyRoboCopy itself, just extracted robocopy.exe out of its setup file using WinRAR.)






share|improve this answer































    2














    At a glance, I'd say the file written by Robocopy while using the /UNILOG and /TEE switches contains a UTF-16 little-endian byte order mark followed by an ISO-8859-1 terminal typescript.



    To make it readable, I did the following in Ubuntu:



    dd if=robocopy.log ibs=1 skip=2 obs=512        | # Strip the byte order mark
    iconv --from-code ISO-8859-1 --to-code UTF-8 | # Convert to UTF-8
    col -b > robocopy_utf-8.log # Interpret control characters


    The resulting file matches what I saw in the Windows command prompt.



    Further reading: man dd, man iconv, man col






    share|improve this answer























    • Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
      – Davor Josipovic
      Apr 28 '13 at 8:26












    • This works!!!!!
      – Corey
      Nov 13 '13 at 3:17



















    1














    Looking at the (binary) file output on Win7, the /UNILOG option is useless. It writes the standard UNICODE BOM (FFFE), but then proceeds to write all narrow characters EXCEPT for the options line (e.g., /BYTES /S /COPY:DATS ...), which is actual unicode. After that, it reverts back to ANSI chars, and it is not UTF-8, either; i.e., if you have a filename with a wide character in the path, it is converted to a narrow '?' character.



    Apparently no interest in fixing it from MSFT, since it's been this way for some time, and I have all updates.






    share|improve this answer





















    • There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
      – Nas Banov
      Oct 19 '16 at 22:53



















    1














    I fixed my unreadable, Unicode-format Robocopy log files in Windows (which were accidentally created by appending normal Robocopy output to Unicode output from Out-File in PowerShell), as follows:



    In PowerShell:



    $bytes = [System.IO.File]::ReadAllBytes('C:TempRoboCopyLog.txt')
    $len = $bytes.Length
    #Remove the Unicode BOM, and convert to ASCII
    $text = [System.Text.Encoding]::ASCII.GetString($bytes,2,$len -2)
    $text


    The above code may not work for all file sizes!



    (Credit for code: I adapted code from this post by Ferdinand Prantl: Stackoverflow - Read/Parse Binary files with PowerShell






    share|improve this answer























    • This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
      – curropar
      Nov 5 at 12:26



















    1














    Use UTF-8 code page, then run winword converter



    If your file or directory names contain Unicode characters then before issuing the Robocopy command with the /unilog parameter use the chcp 65001 command. (Code page 65001 is UTF-8.)



    Once you have the mangled Unicode log, just open it up in MS Word as Unicode (UTF-8) and save it:



    MS Word File Conversion Dialog






    share|improve this answer































      0














      In your case, the command in Powershell goes something like this:



      robocopy C:mysource D:mydest /mir | Out-File backup.log


      The workaround is that you use Out-File instead of built-in /unilog parameter.
      You will get exactly the same log file, but now it will be properly written in unicode.






      share|improve this answer

















      • 3




        Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
        – Davor Josipovic
        Apr 28 '13 at 7:17



















      0














      Run the chcp command before robocopy command, with the right code page.



      for UTF-8 (not working with robocopy & Hebrew and maybe more languages):



      chcp 65001 | Out-Null


      for Hebrew:



      chcp 1255 | Out-Null 


      Full code page list:
      https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "3"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f295934%2frobocopy-unilog-output-is-gibberish%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        7 Answers
        7






        active

        oldest

        votes








        7 Answers
        7






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        Bug in XP27. Try downgrade to XP26.



        It appears to be a bug in the XP27 version of RoboCopy (which comes with Windows 7).



        In version XP26 (which comes with Windows Vista) /UNILOG produces a perfectly readable Unicode log file for me.



        If you don't have a copy of Vista laying around EasyRoboCopy also comes with the XP26 version. (I haven't actually tried EasyRoboCopy itself, just extracted robocopy.exe out of its setup file using WinRAR.)






        share|improve this answer




























          5














          Bug in XP27. Try downgrade to XP26.



          It appears to be a bug in the XP27 version of RoboCopy (which comes with Windows 7).



          In version XP26 (which comes with Windows Vista) /UNILOG produces a perfectly readable Unicode log file for me.



          If you don't have a copy of Vista laying around EasyRoboCopy also comes with the XP26 version. (I haven't actually tried EasyRoboCopy itself, just extracted robocopy.exe out of its setup file using WinRAR.)






          share|improve this answer


























            5












            5








            5






            Bug in XP27. Try downgrade to XP26.



            It appears to be a bug in the XP27 version of RoboCopy (which comes with Windows 7).



            In version XP26 (which comes with Windows Vista) /UNILOG produces a perfectly readable Unicode log file for me.



            If you don't have a copy of Vista laying around EasyRoboCopy also comes with the XP26 version. (I haven't actually tried EasyRoboCopy itself, just extracted robocopy.exe out of its setup file using WinRAR.)






            share|improve this answer














            Bug in XP27. Try downgrade to XP26.



            It appears to be a bug in the XP27 version of RoboCopy (which comes with Windows 7).



            In version XP26 (which comes with Windows Vista) /UNILOG produces a perfectly readable Unicode log file for me.



            If you don't have a copy of Vista laying around EasyRoboCopy also comes with the XP26 version. (I haven't actually tried EasyRoboCopy itself, just extracted robocopy.exe out of its setup file using WinRAR.)







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 21 '17 at 13:16









            StackzOfZtuff

            996718




            996718










            answered Jun 23 '12 at 5:15









            EMP

            2,678103750




            2,678103750

























                2














                At a glance, I'd say the file written by Robocopy while using the /UNILOG and /TEE switches contains a UTF-16 little-endian byte order mark followed by an ISO-8859-1 terminal typescript.



                To make it readable, I did the following in Ubuntu:



                dd if=robocopy.log ibs=1 skip=2 obs=512        | # Strip the byte order mark
                iconv --from-code ISO-8859-1 --to-code UTF-8 | # Convert to UTF-8
                col -b > robocopy_utf-8.log # Interpret control characters


                The resulting file matches what I saw in the Windows command prompt.



                Further reading: man dd, man iconv, man col






                share|improve this answer























                • Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                  – Davor Josipovic
                  Apr 28 '13 at 8:26












                • This works!!!!!
                  – Corey
                  Nov 13 '13 at 3:17
















                2














                At a glance, I'd say the file written by Robocopy while using the /UNILOG and /TEE switches contains a UTF-16 little-endian byte order mark followed by an ISO-8859-1 terminal typescript.



                To make it readable, I did the following in Ubuntu:



                dd if=robocopy.log ibs=1 skip=2 obs=512        | # Strip the byte order mark
                iconv --from-code ISO-8859-1 --to-code UTF-8 | # Convert to UTF-8
                col -b > robocopy_utf-8.log # Interpret control characters


                The resulting file matches what I saw in the Windows command prompt.



                Further reading: man dd, man iconv, man col






                share|improve this answer























                • Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                  – Davor Josipovic
                  Apr 28 '13 at 8:26












                • This works!!!!!
                  – Corey
                  Nov 13 '13 at 3:17














                2












                2








                2






                At a glance, I'd say the file written by Robocopy while using the /UNILOG and /TEE switches contains a UTF-16 little-endian byte order mark followed by an ISO-8859-1 terminal typescript.



                To make it readable, I did the following in Ubuntu:



                dd if=robocopy.log ibs=1 skip=2 obs=512        | # Strip the byte order mark
                iconv --from-code ISO-8859-1 --to-code UTF-8 | # Convert to UTF-8
                col -b > robocopy_utf-8.log # Interpret control characters


                The resulting file matches what I saw in the Windows command prompt.



                Further reading: man dd, man iconv, man col






                share|improve this answer














                At a glance, I'd say the file written by Robocopy while using the /UNILOG and /TEE switches contains a UTF-16 little-endian byte order mark followed by an ISO-8859-1 terminal typescript.



                To make it readable, I did the following in Ubuntu:



                dd if=robocopy.log ibs=1 skip=2 obs=512        | # Strip the byte order mark
                iconv --from-code ISO-8859-1 --to-code UTF-8 | # Convert to UTF-8
                col -b > robocopy_utf-8.log # Interpret control characters


                The resulting file matches what I saw in the Windows command prompt.



                Further reading: man dd, man iconv, man col







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 21 '17 at 13:14









                StackzOfZtuff

                996718




                996718










                answered Apr 18 '13 at 4:05









                ændrük

                12610




                12610












                • Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                  – Davor Josipovic
                  Apr 28 '13 at 8:26












                • This works!!!!!
                  – Corey
                  Nov 13 '13 at 3:17


















                • Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                  – Davor Josipovic
                  Apr 28 '13 at 8:26












                • This works!!!!!
                  – Corey
                  Nov 13 '13 at 3:17
















                Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                – Davor Josipovic
                Apr 28 '13 at 8:26






                Any way to do similar conversion in windows? I have tried this conversion in pipe in PowerShell, but with no success:([System.Text.Encoding]::Unicode).GetString([System.Text.Encoding]::Convert([System.Text.Encoding]::GetEncoding(28591), [System.Text.Encoding]::Unicode, ([System.Text.Encoding]::GetEncoding(28591)).GetBytes($_)))
                – Davor Josipovic
                Apr 28 '13 at 8:26














                This works!!!!!
                – Corey
                Nov 13 '13 at 3:17




                This works!!!!!
                – Corey
                Nov 13 '13 at 3:17











                1














                Looking at the (binary) file output on Win7, the /UNILOG option is useless. It writes the standard UNICODE BOM (FFFE), but then proceeds to write all narrow characters EXCEPT for the options line (e.g., /BYTES /S /COPY:DATS ...), which is actual unicode. After that, it reverts back to ANSI chars, and it is not UTF-8, either; i.e., if you have a filename with a wide character in the path, it is converted to a narrow '?' character.



                Apparently no interest in fixing it from MSFT, since it's been this way for some time, and I have all updates.






                share|improve this answer





















                • There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                  – Nas Banov
                  Oct 19 '16 at 22:53
















                1














                Looking at the (binary) file output on Win7, the /UNILOG option is useless. It writes the standard UNICODE BOM (FFFE), but then proceeds to write all narrow characters EXCEPT for the options line (e.g., /BYTES /S /COPY:DATS ...), which is actual unicode. After that, it reverts back to ANSI chars, and it is not UTF-8, either; i.e., if you have a filename with a wide character in the path, it is converted to a narrow '?' character.



                Apparently no interest in fixing it from MSFT, since it's been this way for some time, and I have all updates.






                share|improve this answer





















                • There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                  – Nas Banov
                  Oct 19 '16 at 22:53














                1












                1








                1






                Looking at the (binary) file output on Win7, the /UNILOG option is useless. It writes the standard UNICODE BOM (FFFE), but then proceeds to write all narrow characters EXCEPT for the options line (e.g., /BYTES /S /COPY:DATS ...), which is actual unicode. After that, it reverts back to ANSI chars, and it is not UTF-8, either; i.e., if you have a filename with a wide character in the path, it is converted to a narrow '?' character.



                Apparently no interest in fixing it from MSFT, since it's been this way for some time, and I have all updates.






                share|improve this answer












                Looking at the (binary) file output on Win7, the /UNILOG option is useless. It writes the standard UNICODE BOM (FFFE), but then proceeds to write all narrow characters EXCEPT for the options line (e.g., /BYTES /S /COPY:DATS ...), which is actual unicode. After that, it reverts back to ANSI chars, and it is not UTF-8, either; i.e., if you have a filename with a wide character in the path, it is converted to a narrow '?' character.



                Apparently no interest in fixing it from MSFT, since it's been this way for some time, and I have all updates.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 7 '13 at 22:13









                Keith

                111




                111












                • There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                  – Nas Banov
                  Oct 19 '16 at 22:53


















                • There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                  – Nas Banov
                  Oct 19 '16 at 22:53
















                There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                – Nas Banov
                Oct 19 '16 at 22:53




                There is no such thing as "actual unicode" encoding. Did you mean UTF-16/UCS-2? It's MS fault to boot for naming this "unilog" in the first place...
                – Nas Banov
                Oct 19 '16 at 22:53











                1














                I fixed my unreadable, Unicode-format Robocopy log files in Windows (which were accidentally created by appending normal Robocopy output to Unicode output from Out-File in PowerShell), as follows:



                In PowerShell:



                $bytes = [System.IO.File]::ReadAllBytes('C:TempRoboCopyLog.txt')
                $len = $bytes.Length
                #Remove the Unicode BOM, and convert to ASCII
                $text = [System.Text.Encoding]::ASCII.GetString($bytes,2,$len -2)
                $text


                The above code may not work for all file sizes!



                (Credit for code: I adapted code from this post by Ferdinand Prantl: Stackoverflow - Read/Parse Binary files with PowerShell






                share|improve this answer























                • This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                  – curropar
                  Nov 5 at 12:26
















                1














                I fixed my unreadable, Unicode-format Robocopy log files in Windows (which were accidentally created by appending normal Robocopy output to Unicode output from Out-File in PowerShell), as follows:



                In PowerShell:



                $bytes = [System.IO.File]::ReadAllBytes('C:TempRoboCopyLog.txt')
                $len = $bytes.Length
                #Remove the Unicode BOM, and convert to ASCII
                $text = [System.Text.Encoding]::ASCII.GetString($bytes,2,$len -2)
                $text


                The above code may not work for all file sizes!



                (Credit for code: I adapted code from this post by Ferdinand Prantl: Stackoverflow - Read/Parse Binary files with PowerShell






                share|improve this answer























                • This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                  – curropar
                  Nov 5 at 12:26














                1












                1








                1






                I fixed my unreadable, Unicode-format Robocopy log files in Windows (which were accidentally created by appending normal Robocopy output to Unicode output from Out-File in PowerShell), as follows:



                In PowerShell:



                $bytes = [System.IO.File]::ReadAllBytes('C:TempRoboCopyLog.txt')
                $len = $bytes.Length
                #Remove the Unicode BOM, and convert to ASCII
                $text = [System.Text.Encoding]::ASCII.GetString($bytes,2,$len -2)
                $text


                The above code may not work for all file sizes!



                (Credit for code: I adapted code from this post by Ferdinand Prantl: Stackoverflow - Read/Parse Binary files with PowerShell






                share|improve this answer














                I fixed my unreadable, Unicode-format Robocopy log files in Windows (which were accidentally created by appending normal Robocopy output to Unicode output from Out-File in PowerShell), as follows:



                In PowerShell:



                $bytes = [System.IO.File]::ReadAllBytes('C:TempRoboCopyLog.txt')
                $len = $bytes.Length
                #Remove the Unicode BOM, and convert to ASCII
                $text = [System.Text.Encoding]::ASCII.GetString($bytes,2,$len -2)
                $text


                The above code may not work for all file sizes!



                (Credit for code: I adapted code from this post by Ferdinand Prantl: Stackoverflow - Read/Parse Binary files with PowerShell







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 23 '17 at 11:33









                Community

                1




                1










                answered Apr 3 '15 at 14:53









                Peter2050

                112




                112












                • This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                  – curropar
                  Nov 5 at 12:26


















                • This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                  – curropar
                  Nov 5 at 12:26
















                This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                – curropar
                Nov 5 at 12:26




                This works if the output doesn't contain Unicode characters; otherwise, those characters are converted to ASCII.
                – curropar
                Nov 5 at 12:26











                1














                Use UTF-8 code page, then run winword converter



                If your file or directory names contain Unicode characters then before issuing the Robocopy command with the /unilog parameter use the chcp 65001 command. (Code page 65001 is UTF-8.)



                Once you have the mangled Unicode log, just open it up in MS Word as Unicode (UTF-8) and save it:



                MS Word File Conversion Dialog






                share|improve this answer




























                  1














                  Use UTF-8 code page, then run winword converter



                  If your file or directory names contain Unicode characters then before issuing the Robocopy command with the /unilog parameter use the chcp 65001 command. (Code page 65001 is UTF-8.)



                  Once you have the mangled Unicode log, just open it up in MS Word as Unicode (UTF-8) and save it:



                  MS Word File Conversion Dialog






                  share|improve this answer


























                    1












                    1








                    1






                    Use UTF-8 code page, then run winword converter



                    If your file or directory names contain Unicode characters then before issuing the Robocopy command with the /unilog parameter use the chcp 65001 command. (Code page 65001 is UTF-8.)



                    Once you have the mangled Unicode log, just open it up in MS Word as Unicode (UTF-8) and save it:



                    MS Word File Conversion Dialog






                    share|improve this answer














                    Use UTF-8 code page, then run winword converter



                    If your file or directory names contain Unicode characters then before issuing the Robocopy command with the /unilog parameter use the chcp 65001 command. (Code page 65001 is UTF-8.)



                    Once you have the mangled Unicode log, just open it up in MS Word as Unicode (UTF-8) and save it:



                    MS Word File Conversion Dialog







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 21 '17 at 23:05









                    StackzOfZtuff

                    996718




                    996718










                    answered Apr 5 '15 at 1:53









                    Karan

                    48.9k1486157




                    48.9k1486157























                        0














                        In your case, the command in Powershell goes something like this:



                        robocopy C:mysource D:mydest /mir | Out-File backup.log


                        The workaround is that you use Out-File instead of built-in /unilog parameter.
                        You will get exactly the same log file, but now it will be properly written in unicode.






                        share|improve this answer

















                        • 3




                          Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                          – Davor Josipovic
                          Apr 28 '13 at 7:17
















                        0














                        In your case, the command in Powershell goes something like this:



                        robocopy C:mysource D:mydest /mir | Out-File backup.log


                        The workaround is that you use Out-File instead of built-in /unilog parameter.
                        You will get exactly the same log file, but now it will be properly written in unicode.






                        share|improve this answer

















                        • 3




                          Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                          – Davor Josipovic
                          Apr 28 '13 at 7:17














                        0












                        0








                        0






                        In your case, the command in Powershell goes something like this:



                        robocopy C:mysource D:mydest /mir | Out-File backup.log


                        The workaround is that you use Out-File instead of built-in /unilog parameter.
                        You will get exactly the same log file, but now it will be properly written in unicode.






                        share|improve this answer












                        In your case, the command in Powershell goes something like this:



                        robocopy C:mysource D:mydest /mir | Out-File backup.log


                        The workaround is that you use Out-File instead of built-in /unilog parameter.
                        You will get exactly the same log file, but now it will be properly written in unicode.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Sep 12 '12 at 8:50









                        Vladimir

                        137114




                        137114








                        • 3




                          Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                          – Davor Josipovic
                          Apr 28 '13 at 7:17














                        • 3




                          Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                          – Davor Josipovic
                          Apr 28 '13 at 7:17








                        3




                        3




                        Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                        – Davor Josipovic
                        Apr 28 '13 at 7:17




                        Sure it will be unicode, but there will be no special unicode characters. It's just ASCII output translated to unicode.
                        – Davor Josipovic
                        Apr 28 '13 at 7:17











                        0














                        Run the chcp command before robocopy command, with the right code page.



                        for UTF-8 (not working with robocopy & Hebrew and maybe more languages):



                        chcp 65001 | Out-Null


                        for Hebrew:



                        chcp 1255 | Out-Null 


                        Full code page list:
                        https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers






                        share|improve this answer




























                          0














                          Run the chcp command before robocopy command, with the right code page.



                          for UTF-8 (not working with robocopy & Hebrew and maybe more languages):



                          chcp 65001 | Out-Null


                          for Hebrew:



                          chcp 1255 | Out-Null 


                          Full code page list:
                          https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers






                          share|improve this answer


























                            0












                            0








                            0






                            Run the chcp command before robocopy command, with the right code page.



                            for UTF-8 (not working with robocopy & Hebrew and maybe more languages):



                            chcp 65001 | Out-Null


                            for Hebrew:



                            chcp 1255 | Out-Null 


                            Full code page list:
                            https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers






                            share|improve this answer














                            Run the chcp command before robocopy command, with the right code page.



                            for UTF-8 (not working with robocopy & Hebrew and maybe more languages):



                            chcp 65001 | Out-Null


                            for Hebrew:



                            chcp 1255 | Out-Null 


                            Full code page list:
                            https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 4 at 10:36









                            fixer1234

                            17.7k144581




                            17.7k144581










                            answered Dec 4 at 9:05









                            mansh_av

                            1




                            1






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Super User!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f295934%2frobocopy-unilog-output-is-gibberish%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Список кардиналов, возведённых папой римским Каликстом III

                                Deduzione

                                Mysql.sock missing - “Can't connect to local MySQL server through socket”