主题: dialects
-
Base64 variants: standard vs URL-safe alphabets, padding rules and decoder strictness
RFC 4648 defines both the standard and URL-safe base64 alphabets and requires padding by default, but JWTs explicitly omit it, MIME wraps lines at 76 characters while GNU base64 needs -w0 to stop doing the same, and decoders from Python to the browser disagree on whether stray characters and missing padding are errors.
-
Version range syntax across npm, Cargo, pip, Composer, Go modules, Maven, NuGet and Bundler
The caret and tilde operators do not mean the same thing everywhere, Go modules have no ranges at all, and a bare version number is an inclusive minimum in NuGet but only a soft suggestion in Maven.
-
Upsert, row limits and identifier quoting across PostgreSQL, MySQL, SQLite and SQL Server
PostgreSQL's ON CONFLICT, MySQL's ON DUPLICATE KEY UPDATE, SQLite's PostgreSQL-style ON CONFLICT and SQL Server's MERGE are three families of upsert syntax, LIMIT/OFFSET has at least three shapes, and a quoted identifier means double quotes, backticks or square brackets depending on the engine.
-
Glob pattern dialects: what * and ** mean in .gitignore, .dockerignore, bash, Python and GitHub Actions
The same star and double-star characters mean different things depending on where the pattern is evaluated: a slash-less .gitignore pattern matches at every depth while the same line in .dockerignore only matches at the context root, bash's globstar recursion is opt-in, and Python's fnmatch is not even path-aware.
-
Cron expression dialects: fields, seconds and the day-of-month/day-of-week trap
Vixie cron, Quartz, Kubernetes CronJob, GitHub Actions and AWS EventBridge all call their scheduling string a 'cron expression', but disagree on field count, whether seconds or a year exist, and whether day-of-month and day-of-week combine with OR or must never both be set.
-
Regex flavors: BRE/ERE, PCRE2, RE2, JavaScript, Python and .NET side by side
The characters + ? | ( ) { } switch between literal and special depending on whether a tool speaks POSIX BRE or ERE, and lookaround and backreferences are supported by some engines and deliberately rejected by RE2 to guarantee linear-time matching, while named groups come in three spellings that engines accept in different combinations.
-
Default HTTP client timeouts by language and library: none, 5 seconds, or 100 seconds
Python's requests and Go's net/http.Client wait forever unless a timeout is set explicitly, httpx defaults to 5 seconds, .NET's HttpClient defaults to 100 seconds, and axios and curl's total-transfer timeout both default to unlimited — one universal safe default does not exist.
-
Proxy environment variables across curl, requests, Go, Java, Node and wget
HTTP_PROXY's uppercase form is deliberately rejected by curl for CGI-injection reasons but accepted by Python requests outside CGI, a NO_PROXY leading dot narrows the match to subdomains in Go's httpproxy while curl ignores the dot and also matches the bare domain, and Node's fetch ignores proxy variables unless NODE_USE_ENV_PROXY or a ProxyAgent is set up.
-
.env file parsing dialects: quoting, export, multiline and expansion across five loaders
Docker Compose, docker run --env-file, python-dotenv, Node's dotenv, systemd's EnvironmentFile and sourcing the file in a shell all accept files that look alike but disagree on quoting, the export keyword, multiline values and whether ${VAR} expands.
-
Duration and interval strings: ISO 8601, Go's ParseDuration, systemd, Prometheus, PostgreSQL and .NET TimeSpan
PT1H30M, 1h30m, '1h 30min' and 01:30:00 can all describe the same span of time, but each parser accepts a different alphabet of unit suffixes and rejects everything else, so a duration string copied between systems often simply fails to parse.
-
Date and time format tokens: strftime, Java, Go, .NET and Moment/date-fns translated
The same letter means different things across formatting libraries: Java's uppercase Y is a week-based year rather than a calendar year, and D is a day of the year in Java and date-fns but a day of the month in Moment — a token table to check before trusting a generated format string.
-
YAML 1.1 vs 1.2 implicit typing: the Norway problem, octal numbers and which parsers use which
YAML 1.1's boolean type treats yes, no, on and off as booleans and a leading zero as octal; YAML 1.2's Core Schema narrows booleans to true/false and requires an explicit 0o prefix for octal — and PyYAML, js-yaml and gopkg.in/yaml.v3 each land in a different place between the two.
机器可读: JSON