---
id: "octal_number"
kind: "pattern"
status: "draft"
is_pii: false
categories: ["values", "common"]
langs: ["common"]
quality: 65
url: "https://registry.apicrafter.io/datatype/octal_number"
---

# Octal number (`octal_number`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Non-negative integer written in base 8 with the prefix 0o, or with a leading zero as in C and in Unix file modes. Without a prefix an octal number cannot be told from a decimal one, so the pattern requires it.

- Pattern of: `numeric`
- Personal data (PII): no
- Categories: All measurable values (percentage, amount and e.t.c) (values), Common (common)
- Countries: global
- Languages: Common to most languages (common)

## Detection

Regular expression (Python `re`):

```
^0[oO]?[0-7]+$
```

## Examples

- `0o755` — 493 with the prefix 0o
- `0644` — 420 with a leading zero, a common file mode
- `0o789` (invalid example) — The digits 8 and 9

## Translations

- ru: Число в восьмеричной записи

## Quality

Score 65/100. Missing: source link, mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/octal_number.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/values/octal_number.yaml>
