CR77: Tausenderpunkte nach einer Regel; eine Datei ist, was in ihr steht #5
Loading…
Reference in a new issue
No description provided.
Delete branch "cr77-thousands-file-kinds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code-Review 3, Befunde K11 und K13 (K6 und K12 warten auf ein Gerät und sind nicht berührt).
K11 – Zahlen in CSV-Dateien.
csv.num("1.234")ergab 1.234,"1.234,5"gar nichts; eine CSV-Zelle1.234,50kam als Zahl ohne Wert an. Jetzt gilt eine Regel (csv.number) fürcsv.num, CSV-Zellen unddecimalComma: Das Komma ist das Dezimalzeichen; ein Punkt (oder geschütztes Leerzeichen) trennt Tausender nur zwischen Dreiergruppen; ein Punkt ist nie Dezimalzeichen.1.234ist immer 1234,0.125in einer Zelle ist Text.K13 – Dateiarten. PNG und PDF galten als CSV, eine
.docxals Arbeitsmappe ohne Blätter. Jetzt entscheidet der Inhalt: Arbeitsmappe nur mit Arbeitsmappen-Teil,odsnur bei Tabellen-mimetype, CSV nur Text. Der Name zählt nicht mehr.xlsx.readwirft nur eigene Fehler (xlsx:no-workbook, neuxlsx:broken).1.234steht in der READMEsheets.falsches-formatabgewiesen, nichts halb gelesennpm run checkgrün, 157 TestsKeine Entscheidungsnummer (das Repo führt keine); die Regeln stehen in der README.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PVUe4hWqPfFUKC4KEEmcM2
K11: csv.num read "1.234" as 1.234 and "1.234,5" as nothing, and the cells of a CSV file got a number without a value for it. One rule now, in csv.number: the comma is the decimal sign; a point (or a no-break space, as CLDR groups for Austria) is a thousands separator between groups of three after one to three digits that do not start with 0; a point is never a decimal sign. csv.num, the cells of a CSV file and decimalComma follow it; num still falls back to a plain number ("0.59"). "0.125" in a cell is text now, as "0.59" always was. K13: detect took every ZIP with [Content_Types].xml for a workbook (a .docx was read as one without sheets), every ZIP with a mimetype entry for an OpenDocument table, and everything without a zero byte in its first eight bytes for CSV (a PNG, a PDF). The bytes decide now: a workbook part makes a workbook, the mimetype must say spreadsheet, CSV is text without control characters that does not start like a PDF, RTF, HTML or XML file. The name no longer counts (a plain workbook named .xlsm is read). detect never throws; xlsx.read refuses a main part that is no workbook with xlsx:no-workbook and turns what a damaged file throws elsewhere into xlsx:broken (cause kept). The rules are in the README. No version bump: the release is its own commit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVUe4hWqPfFUKC4KEEmcM2