Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6062959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:06:39+00:00 2026-05-23T09:06:39+00:00

I want to make my Win32 C++ application able to be played on any

  • 0

I want to make my Win32 C++ application able to be played on any encoding version (UNICODE & ANSI). Now I am a little confused as to what exactly is the difference between the two(or more?) encodings?

To make my Win32 application cross-encoding compatible does that mean I have to go through my code & replace every std::string with std::wstring, then replace every char with a wchar_t* and then replace every literal string(“”) with L””?

What will happen if my application runs on a UNICODE machine & my application has one std::string in it?

Do you have any advice on the steps I need to take to make my application cross-encoding compatible?
For eg:
– Change all c_strings & strings to their UNICODE equivalent
– Change any Win32 functions to the uncide version (eg, change from getenv() to _wgetenv())

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:06:40+00:00Added an answer on May 23, 2026 at 9:06 am

    What will happen if my application runs on a UNICODE machine & my application has one std::string in it?

    Computers are not ANSI or Unicode but the Operating Systems on which the computers operate on are. The last version of Windows that didn’t support Unicode was Windows 3.11 for Workgroups. If you run a ASCII compiled application on a UniCode.

    What exactly is the difference between the two(or more?) encodings?

    What is ASCII?
    ASCII is a seven-bit encoding technique which assigns a number to each of the 128 characters used most frequently in American English. This allows most computers to record and display basic text. ASCII does not include symbols frequently used in other countries.

    What is Unicode?
    One major draw back to ASCII was you could only have 256 different characters. However, languages such as Japanese and Arabic have thousands of characters. Thus ASCII would not work in these situations. The result was Unicode which allowed for up to 65,536 different characters.

    Unicode is an attempt by ISO and the Unicode Consortium to develop a coding system for electronic text that includes every written alphabet in existence. Unicode uses 8-, 16-, or 32-bit characters depending on the specific representation, so Unicode documents often require up to twice as much disk space as ASCII or Latin-1 documents. The first 256 characters of Unicode are identical to Latin-1.

    In Win32, UNICODE is supported by #define-ing the UNICODE and _UNICODE macros. This, in turn, causes your program to use the Unicode variants of the Win32 functions.

    Do you have any advice on the steps I need to take to make my application cross-encoding compatible?

    Each Win32 function (that takes or returns a string) has two variants, one for ASCII and one for Unicode. And the function call resolves to one of these, depending on whether or not the UNICODE macro is defined. So you should define the macro and start using the Unicode versions of the functions. for eg:

    Replacing every std::string with std::wstring,
    Replacing every char with a wchar_t*
    Replacing every literal string("") with L""
    Making use of the TCHAR support in Windows etc.

    as you pointed out are a list of things that you will have to take care of, mind you this is not the complete list.

    Basically, You will have to use all the Unicode versions of the types and function calls in your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make win32 apps and games. Is there any major differences between
net webdeveloper and usually don't make any win32 apps. but now i have to.
I want make interactive application where user launches it and can do various task
When developing a Win32 Application (non-console application) in Visual Studio 2005, is there any
I'm using a Win32 Header. I want to make it so that the header
I want to make the code of my application compile differently for windows mobile,
I want to make a dummy Win32 EXE file that is much larger than
At the moment, our application uses the Trident Win32 component, but we want to
I want to make a tool that runs on win32 to monitor our online
I want make datetimepicker in my project. Using jquery how it is possible? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.