Distinguish characters, bytes, and columns
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
To process multi-byte characters correctly, you need to understand the difference between characters, columns, and bytes:
- Characters are symbols in a code page, each of which is assigned a numeric value
- Bytes are units of storage, each consisting of eight bits
- Columns are units of width, indicating how much width a symbol requires on the monitor or on a printed report
To clarify, examine the following table, which shows two characters, one single-byte and one double-byte, and the byte and column count of each.
| Character | Number of bytes | Number of columns |
|---|---|---|
| A | 1 | 1 |
|
2 | 2 |