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

  • SEARCH
  • Home
  • 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 4552248
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:45:22+00:00 2026-05-21T16:45:22+00:00

I am attempting to write the following character out in windows command prompt: ュ

  • 0

I am attempting to write the following character out in windows command prompt: ュ (U+FF6D).

I am able to see the character get written out using WriteConsoleW. I am also able to see the character if i use WideCharToMultiByte using the CP_ACP code page (chcp returns 932: Japanese). However, when I attempt to use regular wcout on the same string which WriteConsoleW successfully prints, it chokes.

When I execute setlocale(LC_ALL, “”) it prints English_UnitedStates.1252 (the default code page that I had when I installed).

Why is wcout failing when the others are succeeding?

Note: I rebooted the machine to change its system locale to Japan Japanese

  • 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-21T16:45:23+00:00Added an answer on May 21, 2026 at 4:45 pm

    The default locale for C++ iostreams is always the "C" locale. From the C++03 standard, §27.4.2.3/4:

    locale getloc() const;

    If no locale has been imbued, a copy of the global C++ locale, locale(), in effect at the time of construction.

    From §22.1.1.2/1-2:

    locale() throw();

    Default constructor: a snapshot of the current global locale.

    Constructs a copy of the argument last passed to locale::global(locale&), if it has been called; else, the resulting facets have virtual function semantics identical to those of locale::classic().

    From §22.1.1.5/4-6:

    static const locale& classic();

    The "C" locale.

    Returns: A locale that implements the classic "C" locale semantics, equivalent to the value locale("C").

    Notes: This locale, its facets, and their member functions, do not change with time.

    As std::cout and std::wcout have static storage duration, they are guaranteed to be initialized before main is called, and consequently will always have the "C" locale at application startup; i.e., there is no point early enough in execution that one can call locale::global and change the default locale for std::cout and std::wcout. Thus, you must always imbue the global streams yourself if you want to use a non-default code page.

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

Sidebar

Related Questions

I'm attempting to write a bash script to parse out the following log file
I have been attempting to write a VBA Script that can parse out other
I'm attempting to write a very basic script using javascript. What I want to
I'm attempting to write some unit tests using EasyMock and TestNG and have run
I am attempting to write a regex that validates any of the following cases:
I receive the following exception while attempting to log an error using Enterprise Library
I am attempting to run the following PowerShell command against my Exchange 2010 SP1
I am attempting to write a single line of Python code for the following:
I'm attempting to write a function to compare two arrays of pointers to see
I am attempting to write a recursive descent parser in PHP for the following

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.