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

The Archive Base Latest Questions

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

This question is language agnostic but is inspired by these c/c++ questions. How to

  • 0

This question is language agnostic but is inspired by these c/c++ questions.

How to convert a single char into an int

Char to int conversion in C

Is it safe to assume that the characters for digits (0123456789) appear contigiously in all text encodings?

i.e. is it safe to assume that

'9'-'8' = 1
'9'-'7' = 2
...
'9'-'0' = 9

in all encodings?

I’m looking forward to a definitive answer to this one 🙂

Thanks,

Update: OK, let me limit all encodings to mean anything as old as ASCII and/or EBCDIC and afterwards. Sandscrit I’m not so worried about . . .

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

    I don’t know about all encodings, but at least in ASCII and <shudder> EBCDIC, the digits 0-9 all come consecutively and in increasing numeric order. Which means that all ASCII- and EBCDIC-based encodings should also have their digits in order. So for pretty much anything you’ll encounter, barring Morse code or worse, I’m going to say yes.

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

Sidebar

Related Questions

[I am doing this work in Java, but I think the question is language-agnostic.]
This question is language agnostic but I am a C# guy so I use
This question is more or less programming language agnostic. However as I'm mostly into
This is a C# question, but really could be language-agnostic I have inherited a
I assume this question is language agnostic, and apologies if it's quite rudimentary, but
This question is probably language-agnostic, but I'll focus on the specified languages. While working
This is a language agnostic question, but I'm wandering what people prefer in terms
I am using PHP, but I guess this question might be language agnostic. With
I need to extend a class (in C++, but this question is language-agnostic I
I have a question which could be language-agnostic but for this particular implementation I'm

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.