dcsimg
Results 1 to 5 of 5

Thread: Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for export?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2019
    Posts
    11

    Question Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for export?

    Hi. I want to know if Visual Studio 6.0 (in my case Visual C++ 6.0) supports UTF-8 encoding of files (I am running Windows 98 SE in a virtual machine, VS6 is running in that machine). Because I can't seem to see any way to change default encoding of the source code. I need UTF-8 so GitHub doesn't complain about different encoding used for files (and Czech characters are incorrectly displayed when using that encoding on GitHub).

    Next question: How can I change an export codepage to other values - like DOS encoding? Because ANSI encoding is good for Windows applications, but console applications need DOS encoding in order to display special characters correctly. I need to display correct codepages. Because I am using Czech characters in my applications, I need codepages 1250 (Czech ANSI) and 852 (Czech DOS). I know how to set codepage 1250, it is in the list. But how do I set the codepage 852?

  2. #2
    Fanatic Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    638

    Re: Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for expo

    If codepage 852 isn't installed, then you need to first install it. Have a look at http://www.barrcentral.com/help/beps...to_Windows.htm which describes how to install a missing code page.

    Once installed, it should appear on the list.
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++17 Compiler: Microsoft VS2019 (16.3.9)

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2019
    Posts
    11

    Re: Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for expo

    Well, 852 is installed, for sure. It's Windows 98 SE, which works on MS-DOS architecture, CP852 is installed and used for MS-DOS command prompt, while CP1250 is used for Windows. Console application needs CP852 since it runs under MS-DOS command prompt, even it's actually Win32 application.

  4. #4
    Fanatic Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    638

    Re: Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for expo

    If it's installed then you just need to select and use it. See SetConsoleCP() https://docs.microsoft.com/en-us/win...e/setconsolecp
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++17 Compiler: Microsoft VS2019 (16.3.9)

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2019
    Posts
    11

    Re: Does Visual Studio 6.0 support UTF-8 encoding? Can I set other codepages for expo

    You know what? Forget export, because I guess you misunderstood. I need to correctly display Czech characters in compiled programs, but I'd like to avoid Unicode, because Windows 98 does not naturally support Unicode encoding (it can be, however, installed). For Windows apps, I need ANSI, which I can use. But console app needs MS-DOS encoding (CP852) because not only I need to correctly display output, I also need to correctly intercept input.

    But that's nothing. What bothers me more is the way to save source code into UTF-8 encoding. GitHub complains about it saved in ANSI encoding and it can't correctly display Czech characters that I wrote inside (my name for instance). So I look for a way to save the source code from VS6 to UTF-8 (and VS6 to actually correctly open UTF-8 file), so GitHub does not complain and it can display correct characters.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width