0

I know UNICODE character set follows the UTF encoding style. But does ASCII character set follow any encoding style?

6
  • 10
    ASCII is a character-encoding scheme Commented Nov 12, 2021 at 4:10
  • I'm confused. In C++ if you use wchar_t , it will use UNICODE character set with a UTF-16 encoding, is what I read. So is there any similarity with ASCII set? Or ASCII is an encoding itself? If yes then what character set does it use? Commented Nov 12, 2021 at 4:14
  • ASCII is a subset of unicode, see basic latin in unicode thats the ASCII subset Commented Nov 12, 2021 at 4:24
  • 2
    @PyGamer0 Other way around. UTF is a superset of ASCII. ASCII came first. OP: see en.wikipedia.org/wiki/ASCII Commented Nov 12, 2021 at 4:57
  • @Zeph_The_Hungry_Loli wchar_t is not any specific encoding, it's just 16-bit characters in whatever encoding you put there. Or just 16-bit numbers. Commented Nov 12, 2021 at 7:57

1 Answer 1

1

Unicode, formally, is the Standard. It can be implemented by different character encodings. The Unicode standard defines Unicode Transformation Formats (UTF): UTF-8, UTF-16, and UTF-32, and several other encodings. UTF-8 uses one to four bytes per code point and, being compact for Latin scripts and ASCII-compatible. The first 128 code points represent the ASCII characters, which means that any ASCII text is also a UTF-8 text.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.