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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:01:17+00:00 2026-06-10T13:01:17+00:00

I found the C standard (C99 and C11) vague with respect to character/string code

  • 0

I found the C standard (C99 and C11) vague with respect to character/string code positions and encoding rules:

Firstly the standard defines the source character set and the execution character set.
Essentially it provides a set of glyphs, but does not associate any numerical values
with them – So what is the default character set?

I’m not asking about encoding here but just the glyph/repertoire to numeric/code point mapping.
It does define universal character names as ISO/IEC 10646, but does it say that
this is the default charset?

As an extension to the above – I couldn’t find anything which says what characters
the numeric escape sequences \0 and \x represent.

From the C standards (C99 and C11, I didn’t check ANSI C) I got the following
about character and string literals:

 +---------+-----+------------+----------------------------------------------+
 | Literal | Std | Type       | Meaning                                      |
 +---------+-----+------------+----------------------------------------------+
 | '...'   | C99 | int        | An integer character constant is a sequence  |
 |         |     |            | of one or more multibyte characters          |
 | L'...'  | C99 | wchar_t    | A wide character constant is a sequence of   |
 |         |     |            | one or more multibyte characters             |
 | u'...'  | C11 | char16_t   | A wide character constant is a sequence of   |
 |         |     |            | one or more multibyte characters             |
 | U'...'  | C11 | char32_t   | A wide character constant is a sequence of   |
 |         |     |            | one or more multibyte characters             |
 | "..."   | C99 | char[]     | A character string literal is a sequence of  |
 |         |     |            | zero or more multibyte characters            |   
 | L"..."  | C99 | wchar_t[]  | A wide string literal is a sequence of zero  |
 |         |     |            | or more multibyte characters                 | 
 | u"..."  | C11 | char16_t[] | A wide string literal is a sequence of zero  |
 |         |     |            | or more multibyte characters                 | 
 | U"..."  | C11 | char32_t[] | A wide string literal is a sequence of zero  |
 |         |     |            | or more multibyte characters                 | 
 | u8"..." | C11 | char[]     | A UTF-8 string literal is a sequence of zero |
 |         |     |            | or more multibyte characters                 | 
 +---------+-----+------------+----------------------------------------------+

However I couldn’t find anything about the encoding rules for these literals.
UTF-8 does seem to hint UTF-8 encoding, but I don’t think it’s explicitly mentioned
anywhere. Also, for the other types is the encoding undefined or implementation dependent?

I’m not to familiar with the UNIX specification. Does the UNIX specification specify any additional constraint(s) to these rules?

Also if anyone can tell me what charset/encoding scheme is used by GCC and MSVC that would also help.

  • 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-06-10T13:01:18+00:00Added an answer on June 10, 2026 at 1:01 pm

    C is not greedy about character sets. There’s no such thing as “default character set”, it’s implementation defined – although it’s mostly ASCII or UTF-8 on most modern systems.

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

Sidebar

Related Questions

I found this code for a replacement gotoxy() function using C standard library only.
From the standard view-based application, I found that the generated code did this: self.window.rootViewController
I found this in the standard as the post-condition for the rehash function in
I found a problem with host - client float standard in OpenCL. The problem
In standard library, I found that namespace std is declared as a macro. #define
While playing with standard library i've found a strange difference between python2 and python3.
I have found the result of 'top' is different from result of in standard
I am interested in the inner working of the standard C library. I found
The standard includes macros line _____LINE_____ & _____FILE_____, and C99 adds _____FUNCTION_____ which is
link text I installed windows mobile 6.0 standard sdk but later found out my

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.