Data and files: separate text, table and image rules
Edited by: Hitoiki Arcade / Hitoiki Learning team · Published: · References and presentation updated: · Editorial policy
Text looks garbled on another device, an address unexpectedly becomes two spreadsheet columns, or a logo covers the background instead of letting it show through. All involve data, but each depends on a different rule. Begin by separating the content you meant to store from the rules the receiving program used to read it.
A file name or an attractive preview does not establish its internal representation. This guide connects characters to bytes, table values to field boundaries, and pixel colors to opacity. The examples help you identify which rule preserves the meaning of a particular piece of data.
Match the encoding before changing the appearance
Character encoding maps character codes to stored byte sequences. A font instead supplies the shapes used to display characters. When text becomes garbled, compare the encoding used to write it with the encoding assumed when reading it. Increasing the font size does not repair an incorrect mapping between bytes and characters.
UTF-8 preserves ASCII characters as single-byte values and can use multiple bytes for other characters. Counting displayed characters is therefore not always a way to count stored bytes. Character identity, visual width and byte length answer different questions; keeping them separate makes file-size and length limits easier to understand.
ASCII expands to American Standard Code for Information Interchange; UTF expands to Unicode Transformation Format. The names describe character coding and the mapping of Unicode scalar values to bytes. Recognizing a name does not establish which encoding was actually used for the file in front of you.
Each section link opens a quiz on related topics. Questions may cover more than that section, so check the range and difficulty before starting.
Keep field boundaries separate from field contents
A CSV comma separates fields, but commas can also belong to an address or place name. Under RFC 4180, the single value Tokyo, Japan is enclosed in double quotes. Quoting lets the receiver distinguish a delimiter from a comma that is part of the value.
Deleting the comma might restore the expected column count while changing the original information. A quoted field can also contain a line break, so one physical line is not always one record. After parsing a table, check its column alignment, character decoding and preserved values as separate parts of a successful exchange.
CSV means Comma-Separated Values. In a roster, one person’s record contains fields such as name and address. Identify the subject of a row and its fields before interpreting delimiters; quotation preserves an embedded comma rather than silently changing the value.
PNG pixels can carry alpha information describing opacity in addition to color. Alpha is not another name for image width or a color label. Separating color and opacity explains how two pixels with the same color can interact differently with a background.
Imagine placing a logo over a colored page. A PNG without transparency information has opaque pixels; its format name alone does not make it transparent. Checking the information actually stored, rather than assuming properties from a label, is useful for text and table exchanges as well.
PNG means Portable Network Graphics; SVG means Scalable Vector Graphics. Compare storing pixel colors with describing a shape’s outline using lines and curves. Both are image representations, but that shared purpose does not establish identical internal information or every property of a particular file.
Define the unit and the meaning of a numeric value
A capacity figure depends on what one unit counts. One byte is eight bits, one MB is 1000000 bytes and one MiB is 1048576 bytes. The same 1048576 bytes can be described as 1 MiB or 1.048576 MB. A smaller displayed number is not evidence of compression. Text has a related counting distinction: a code-point count does not necessarily equal the number of visible character units.
UTF-8 uses one to four bytes per scalar value, while UTF-32 uses four. A combining sequence can still appear as one visible character, so code-point count and visible-unit count differ. Images also distinguish pixels from their components: eight bits for each PNG RGB sample gives 24 bits of color per pixel. Alpha, compression and encoded-file size remain separate considerations.
When exchanging JSON, decide whether a value is a quantity or an identifier. A non-arithmetic membership number can be preserved as a string instead of risking rounding in a numeric receiver. Arrays preserve meaningful measurement order; objects associate field names with values. [10,20] and [20,10] differ in sequence, whereas object-member writing order should not carry that same meaning.
JSON means JavaScript Object Notation. Objects associate names with values; arrays preserve sequence, alongside primitive strings, numbers, Booleans and null. A product name and a quantity have different meanings. Successful parsing alone does not determine how each value should be interpreted in the exchange contract.
A relative path such as data\memo.txt resolves from a current directory. Running from A or B can make the same string lead to different data folders. When the wrong file appears to have been opened, compare both the path and the base from which it was resolved.
Two paths need not mean two independent copies. Hard links identify the same file, so editing its contents through one name changes what is read through the other. Naming and copying are different operations. For recovery, check whether independently preserved contents exist rather than counting how many paths point to the same object.
Two names can share one file
Hard links lead from different names to shared contents. Check for an independent copy separately from the number of names.
Compare the choices before opening the answer and explanation. Reading an example does not save a test answer or score.
Example 1 · Data and files
Which rule maps text characters to byte sequences in a file?
Character encoding
Compression method
Line-ending convention
Font
Read the answer and explanation
Answer: Character encoding
Character encoding connects character codes with the bytes used to store them. A reader decodes those bytes using an encoding rule, so the reading and writing rules must agree to recover the intended characters. A font handles their visual appearance instead.
Read reasoning and more detail
Changing a font or increasing display size does not by itself repair bytes that have been interpreted using the wrong encoding.
Characters, code points, bytes, UTF encoding forms and BOMs.
Source checked: 2026-10-05
Example 2 · Data and files
Under RFC 4180, how should a single field containing Tokyo, Japan be written?
Tokyo; Japan
Tokyo Japan
"Tokyo, Japan"
Tokyo, Japan
Read the answer and explanation
Answer: "Tokyo, Japan"
Enclose the complete value in double quotes: "Tokyo, Japan". CSV normally uses a comma to separate fields, but this comma belongs to the place-name value. Quoting tells the reader to retain it inside one field.
Read reasoning and more detail
Leaving the value unquoted can split it into two fields. Deleting or replacing the comma may fix a column count while changing the original information.
Records, fields, quoting, line breaks and character sets.
Source checked: 2026-10-05
Example 3 · Data and files
What does the alpha value of a PNG pixel represent?
Its opacity
Color brightness
The image pixel density
Color saturation
Read the answer and explanation
Answer: Its opacity
Alpha represents pixel opacity, separately from the red, green and blue color values. Zero alpha means fully transparent, while the maximum value means fully opaque. Two pixels with the same red color can therefore interact differently with a background.
Read reasoning and more detail
To investigate transparency, examine the transparency information and its values rather than inferring opacity from a color name or the image’s dimensions.
SVG's full name and support for vector and raster graphics.
Source checked: 2026-10-05
Continue with a quiz
Topics: Data and files. Range: Everyday knowledge, Broader knowledge, General knowledge. Difficulty: Basic, Standard. These are selected initially. You can change these on the setup screen.
This opens the setup screen with this subject and topic selected. Check the mode and question count before you start.
A test shows explanations after submission. Continuous challenge explains each answer. Review uses unresolved mistakes recorded on this device. Casual mode does not update learning records.