locked
activeCodePage in Manifest RRS feed

  • Question

  • Microsoft introduced the "Beta: use Unicode UTF-8 for world wide language support" checkbox in 1803, which seems to turn the default codepage from 1252 to 65001 (UTF-8). This is quite bad for some legacy code, because it can't handle multibyte characters.

    Is there any way a program can set its own active codepage back to 1252, even if the mentioned checkbox is set? e.g. if you have a system with codepage 1252, you can set the active codepage to UTF-8 with this manifest

      <application>
        <windowsSettings>
          <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
        </windowsSettings>
      </application>

    I need this the other way round. I tried changing UTF-8 to windows-1252, 1252, WINDOWS-1252, but no effect at all. How can I set the active codepage to 1252?

    Friday, March 6, 2020 8:49 AM

All replies

  • No, the only value that ActiveCodePage supports is UTF-8.  Was wondering the same thing and spent a while looking at it but unfortunately it is impossible to protect your application against the UTF-8 checkbox.  

    The best you can do is create something that checks the value in the registry upon startup of your app and warn the user to turn it off if it's on. 

    Monday, March 9, 2020 6:35 PM
  • Hi,

    Yes, I believe any file is a valid Windows-1252 file. But there are certainly characteristics which would strongly suggest that it's UTF-8. I'm afraid that you could only use UTF-8.

    In addition, as far as I know, to change the codepage for the console only, do the following:

    Start -> Run -> regedit
    Go to [HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun]
    Change the value.

    Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, March 13, 2020 10:06 AM
  • Hi,

    Haven't received your message a few days, was your issue resolved?
    I am proposing previous helpful replies as "Answered". Please feel free to try it and let me know the result. If the reply is helpful, please remember to mark it as answer which can help other community members who have same questions and find the helpful reply quickly.
    Best regards,
    Carl


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Saturday, March 28, 2020 8:47 AM