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 766623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:04:39+00:00 2026-05-14T17:04:39+00:00

Since Windows doesnt have a C++ locale with UTF8 support by default, i would

  • 0

Since Windows doesnt have a C++ locale with UTF8 support by default, i would like to construct a custom locale object which supports UTF8 (by creating it with a custom ctype facet).

How can i construct a locale object with a my own ctype implementation (i only found functions to construct a locale using an already existing locale as base..)

If C++ does not support construction of locales with a custom ctype facet at all, why is that so ?

  • 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-14T17:04:39+00:00Added an answer on May 14, 2026 at 5:04 pm

    It’s possible to create custom facets by inheriting from std::locale::facet. Locales can use those custom facets as in following code:

    class custom_facet : public std::locale::facet {
    public:
        static std::locale::id id;
        custom_facet(int);  
        int custom_value() const; 
        };
    
    std::locale  custom_locale ( std::locale(), new custom_facet() );
    int s = std::use_facet<custom_facet>(custom_locale).custom_value();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been quite comfortable with windows-services, I have been practicing since from last
I have been looking at the Kinect for Windows release notes and features, since
I have a windows form application which interacts with a remote database. the database
I have an ASP.NET application which I'd like to try running on Mono, just
since Windows Vista there is an new Win32-API call CreateSymbolicLink to create a symbolic
Since I've read Windows User Experience Interaction Guidelines (there's a PDF download avaliable) I've
Does Windows XP (and up) store how long it has been... ...since the system
It's been a while since I've installed PHP for Windows, but every guide I've
We recently moved our Windows CE application to the SD Card. Since then the
I'm an experienced C/C++ Windows developer writing my first real iOS application. Since 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.