VS2019: How to resolve the “unknown sub-lang: 0x8” message in Resource View?

前端 未结 6 880
有刺的猬
有刺的猬 2021-01-12 19:06

I have recently started using Visual Studio 2019 for my C++11 project. VS2019 converted the project and it compiles into an executable. But I can\'t open my resource (.rc) f

6条回答
  •  萌比男神i
    2021-01-12 19:40

    What helped me, was to replace this:

    LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

    #pragma code_page(1252)

    (which specifies language English, US with ANSI Latin 1; Western European (Windows) encoding)

    By this :

    LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

    #pragma code_page(65001)

    (which specifies Language neutral with UTF-8 encoding)

    Once I'd made that change (making sure the .rc file was UTF-8 encoded), Visual Studio no longer complained.

    See https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers and https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-makelangid#remarks

提交回复
热议问题