Questions tagged [ascii]

17 questions
119
votes
5 answers

What is the advantage of choosing ASCII encoding over UTF-8?

All characters in ASCII can be encoded using UTF-8 without an increase in storage (both requires a byte of storage). UTF-8 has the added benefit of character support beyond "ASCII-characters". If that's the case, why will we ever choose ASCII…
Pacerier
  • 4,973
  • 7
  • 39
  • 58
69
votes
6 answers

Should Latin-1 be used over UTF-8 when it comes to database configuration?

We are using MySQL at the company I work for, and we build both client-facing and internal applications using Ruby on Rails. When I started working here, I ran into a problem what I had never encountered before; the database on the production server…
Ten Bitcomb
  • 1,154
  • 1
  • 9
  • 14
15
votes
1 answer

Why are the punctuation characters in the ASCII table all over the place?

In the ASCII table, punctuation characters appear between the non-printing characters and before the numbers (!"#$%&')*+,-./), between the numbers and the uppercase letters (:;<=>?@), between the uppercase letters ([\]^_`) and the lowercase letters,…
Qqwy
  • 4,709
  • 4
  • 31
  • 45
12
votes
5 answers

How do you compress ASCII strings into fewer bytes?

I'm working with an embedded device with a unique protocol that sends messages to other devices and I'm making an application that parses the sent packets. Each packet carries 8 bytes. The protocol is defined as where first byte is header and…
TtT23
  • 1,553
  • 4
  • 20
  • 28
10
votes
7 answers

Are there historical problems with non-ASCII identifier characters in code?

I frequently encounter recommendations to specifically keep to ASCII characters in field and function names in documentation, even though non-ASCII (modern Unicode) generally works perfectly. An example is the recent Python 3.10 documentation. I've…
9
votes
1 answer

What is the encoding used in Git's binary patches?

Git can generate patches/diffs for binary files as well as for text files. I'm trying to figure out what encoding it uses for its binary patches. Here is an example: diff --git a/www/images/openconnect.png b/www/images/openconnect.png new file mode…
Dan Lenski
  • 427
  • 2
  • 9
7
votes
1 answer

Why was the grave but not the acute accent included in ASCII?

While looking at the Unicode properties (code point, script, block, UTF-8 and UTF-16 encoding, etc.) of some characters, I stumbled upon major differences between ` ("GRAVE ACCENT") and ´ ("ACUTE ACCENT"): Name Code point Script Block …
xehpuk
  • 175
  • 3
6
votes
2 answers

Why was ASCII needed?

With an encoding such as EBCDIC being in existence already (and being 8 bit to boot), what was the need to invent yet another encoding and a 7 bit one at that? Why was ASCII invented and what problems with EBCDIC did supposed to solve?
Oded
  • 53,326
  • 19
  • 166
  • 181
2
votes
3 answers

What is the name of the type of program to produce Unicode characters from ASCII combinations?

For example, in Vietnamese, there are Unicode characters like "â", "ê", "ô", "ư", v.v. To type them from keyboard, I need to type aa, ee, oo, w, then a program will convert them to correct characters. What is the name of that kind of program? My…
Ooker
  • 174
  • 9
2
votes
1 answer

Differentiating Between ASCII and Unicode in File Spec

I am developing against a file spec that lists the data type for certain fields as CHAR() The spec is for a fixed width flat file. In most cases, possible values to populate the fields are obvious (either delineated in a list of choices, or…
2
votes
2 answers

How to detect client character encoding?

I programmed a telnet server using C as programming language but I have a problem to send characters with emphases (é, è, à ...). The character encoding is different between the telnet clients (windows, linux, putty, ...). What can I do to detect…
ipStack
  • 121
  • 2
2
votes
2 answers

What are the commonly confused encodings that may result in identical test data?

I'm fixing code that is using ASCIIEncoding in some places and UTF-8 encoding in other functions. Since we aren't using the UTF-8 features, all of our unit tests passed, but I want to create a heightened awareness of encodings that produce similar…
makerofthings7
  • 6,038
  • 4
  • 39
  • 77
1
vote
1 answer

What type of encoding does wikipedia use?

I have the wikipedia data dump and trying to decode special characters in the page titles, except a lot of characters don't match up the "standard" ascii encoding (referencing from here.) As an example, in wikipedia ë and ã are given as: ë =…
1
vote
2 answers

Non-printable characters and editors

Today I was presented with a very nasty problem and I do not quite know where to ask this but hope here is ok. So I have the following string: "\0" (at least that's how it looks in visual studio). If you open the same file in notepad++ it looks like…
Vincent
  • 365
  • 4
  • 11
1
vote
2 answers

How are ASCII code associations actually stored and retrieved?

I was reading about compilers and was given an example of creating a basic compiler that recognizes escape sequences without referencing ASCII. Somebody suggested that once I compile a piece of code with ASCII numbers, I can then recompile a…
justthom8
  • 131
  • 1
  • 4
1
2