Keep accented letters in AS names (closes #165) #172

Merged
clawbot merged 1 commits from issue-165-accented-as-names into next 2026-10-27 01:50:35 +01:00
Collaborator

Fixes #165.

AS list. cmd/asinfo-gen checks only the first three header columns (asn, handle, description) and reads past the rest. Today's file calls its fourth column country-code, not country. The parsing is in parseCSV in main.go itself, because make asupdate runs that one file. pkg/asinfo/asdata.json.gz is regenerated: AS1251 reads "FUNDAÇÃO DE AMPARO À PESQUISA DO ESTADO SÃO PAULO".

WHOIS. An answer from any server that is not valid UTF-8 is decoded as Latin-1 before it is parsed and stored.

Tests the new list changed. The source no longer lists AS 0 or the documentation AS numbers, and drops commas from names.

  • pkg/asinfo: AS1 is "Level 3 Parent LLC" with handle LVLT-1, and Cloudflare is "Cloudflare Inc.". The AS 0 cases are gone; AS1251 replaces one.
  • internal/server: Cloudflare's name as above. The AS detail tests no longer need AS64500 and AS64501 in the list. The check for AS 0's description and the "iana" search check are removed.

Disclosures.

  • Brief corrected: LACNIC sends UTF-8, not Latin-1. Its answers recorded today for AS52751, AS1251 and AS6147 say so, as does RIPE's database working group. RIPE and APNIC send Latin-1, and the fix covers them.
  • Not fixed: for a Brazilian AS, LACNIC's answer already holds replacement characters, as in "Brasrede Telecomunica��es LTDA". NIC.br's own server, whois.registro.br, sends these records in Latin-1. Asking it would be a separate change.
  • The AS 0 filter in the AS search stays, but the built-in list no longer reaches it.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/routewatch/issues/165. **AS list.** `cmd/asinfo-gen` checks only the first three header columns (`asn`, `handle`, `description`) and reads past the rest. Today's file calls its fourth column `country-code`, not `country`. The parsing is in `parseCSV` in `main.go` itself, because `make asupdate` runs that one file. `pkg/asinfo/asdata.json.gz` is regenerated: AS1251 reads "FUNDAÇÃO DE AMPARO À PESQUISA DO ESTADO SÃO PAULO". **WHOIS.** An answer from any server that is not valid UTF-8 is decoded as Latin-1 before it is parsed and stored. **Tests the new list changed.** The source no longer lists AS 0 or the documentation AS numbers, and drops commas from names. - `pkg/asinfo`: AS1 is "Level 3 Parent LLC" with handle `LVLT-1`, and Cloudflare is "Cloudflare Inc.". The AS 0 cases are gone; AS1251 replaces one. - `internal/server`: Cloudflare's name as above. The AS detail tests no longer need AS64500 and AS64501 in the list. The check for AS 0's description and the "iana" search check are removed. **Disclosures.** - Brief corrected: LACNIC sends UTF-8, not Latin-1. Its answers recorded today for AS52751, AS1251 and AS6147 say so, as does RIPE's database working group. RIPE and APNIC send Latin-1, and the fix covers them. - Not fixed: for a Brazilian AS, LACNIC's answer already holds replacement characters, as in "Brasrede Telecomunica��es LTDA". NIC.br's own server, `whois.registro.br`, sends these records in Latin-1. Asking it would be a separate change. - The AS 0 filter in the AS search stays, but the built-in list no longer reaches it. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 01:37:00 +01:00
clawbot self-assigned this 2026-10-27 01:37:00 +01:00
clawbot added 1 commit 2026-10-27 01:37:01 +01:00
The built-in AS list had no letter outside ASCII, and make asupdate
rejected today's as.csv, which added a country code column.

The generator now checks only the first three header columns and reads
past the rest; the parsing moved into parseCSV. The list is regenerated.
The new source spells some names differently and no longer lists AS 0
or the documentation AS numbers, so the tests that relied on those
entries changed.

A WHOIS answer that is not valid UTF-8 is now decoded as Latin-1, which
RIPE and APNIC send, before it is parsed and stored. LACNIC answers in
UTF-8.

Model: opus-5-5
Author
Collaborator

PASS: meets #165 as the PR body corrects it, and can be merged into next.

  • Unverified: that RIPE and APNIC send Latin-1 was not checked against live answers; the RIPE NCC statement the PR cites was taken as the source.
  • Judgement call: the AS search keeps its AS 0 filter while its test is removed, because the built-in list no longer holds AS 0; not counted against the PR.

Model: opus-5-5

PASS: meets https://git.eeqj.de/sneak/routewatch/issues/165 as the PR body corrects it, and can be merged into `next`. - Unverified: that RIPE and APNIC send Latin-1 was not checked against live answers; the RIPE NCC statement the PR cites was taken as the source. - Judgement call: the AS search keeps its AS 0 filter while its test is removed, because the built-in list no longer holds AS 0; not counted against the PR. Model: opus-5-5
clawbot merged commit 6d55d39737 into next 2026-10-27 01:50:35 +01:00
clawbot deleted branch issue-165-accented-as-names 2026-10-27 01:50:36 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#172