Unreadable non-ANSI characters in Notepad

Page 2 of 2 FirstFirst 12

  1. Posts : 3,453
       #11

    nek4d said:
    1st code of step 3
    Set-ExecutionPolicy Bypass -Scope Process -Force
    gives me
    'Set-ExecutionPolicy' is not recognized as an internal or external command,
    operable program or batch file.

    2nd code of step 3
    $env:USERPROFILE\Desktop\CheckFileEncoding.ps1
    gives me
    The filename, directory name, or volume label syntax is incorrect.

    i did not try next steps.
    It does not work anymore.
    Maybe something is changed with the new win 10 updates, from the time the article was written until today.
    Any help?
    PowerShell... not Command prompt!
      My Computer


  2. Posts : 3
    win 10
       #12

    Ohh, yess, I used Command Promt instead of Powershell!

    However, at the same 1st code of step 3, I get now:
    "
    At line:1 char:17
    + $env:USERPROFILE\Desktop\CheckFileEncoding.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Unexpected token '\Desktop\CheckFileEncoding.ps1' in expression or statement.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
    "
      My Computer


  3. Posts : 1
    Windows 7
       #13

    I can't get it to work. It seems that it could work on the files, that were created and saved in ANSI using the non-English system locale without warning. So the text was saved properly and is just unreadable in the English locale. However I created and saved the document in the English system locale, didn't pay attention to the warning and probably this was the moment when the text was lost. I was able to run the script, but the converted file still shows "?" marks for me.
      My Computer


  4. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #14

    meliander said:
    I can't get it to work. It seems that it could work on the files, that were created and saved in ANSI using the non-English system locale without warning. So the text was saved properly and is just unreadable in the English locale. However I created and saved the document in the English system locale, didn't pay attention to the warning and probably this was the moment when the text was lost. I was able to run the script, but the converted file still shows "?" marks for me.
    Hi and welcome to TenForums!

    Since the post was created, notepad has changed its default encoding from ANSI to UTF8 with BOM, when saving documents, in Windows 10.
    The ANSI encoding was the one creating issues to the non-English locales, since it could not recognize the characters above 255. Nowadays shouldn't be any problem. And especially to English locales!

    Would it be possible to post the exact steps you took, so I can reproduce the problem you're facing?
      My Computer


  5. Posts : 3
    win 10
       #15

    For all people that this solution does not work (like me), the easy manual per file solution, is to open the older ANSI text with the free Notepad++ editor, change the coding to UTF or UTF with BOM and save it. Voila!
      My Computer


  6. Posts : 1
    Windows 10
       #16

    At line:1 char:17
    + $env:USERPROFILE\Desktop\CheckFileEncoding.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Unexpected token '\Desktop\CheckFileEncoding.ps1' in expression or statement.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
      My Computer


  7. Posts : 2,450
    Windows 10 Pro x64
    Thread Starter
       #17

    petrikos said:
    At line:1 char:17
    + $env:USERPROFILE\Desktop\CheckFileEncoding.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Unexpected token '\Desktop\CheckFileEncoding.ps1' in expression or statement.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

    Sorry for the problem, but it works perfectly on my end.
    Can you please check if the file is blocked and unblock it.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:04.
Find Us




Windows 10 Forums