Skip to content

Bibliography person name parser is not UTF-8 compliant #2358

@Omikhleia

Description

@Omikhleia

Minimal example (CLI)

SILE v0.15.13 (LuaJIT 2.1.1703358377) [Rust]
> nbibtex = require("packages.bibtex.support.nbibtex")
> pl.pretty.dump(nbibtex.parse_name("Alvarez-Sancho, Pedro"))
{
  f = "P",
  family = "Alvarez-Sancho",
  ["family-short"] = "A.-S",
  ff = "Pedro",
  given = "Pedro",
  ["given-short"] = "P",
  l = "A.-S",
  ll = "Alvarez-Sancho"
}
> pl.pretty.dump(nbibtex.parse_name("Álvarez-Sancho, Pedro"))
{
  f = "P",
  family = "Sancho",
  ["family-short"] = "S",
  ff = "Pedro",
  given = "Pedro",
  ["given-short"] = "P",
  l = "S",
  ll = "Sancho",
  ["non-dropping-particle"] = "Álvarez",
  ["non-dropping-particle-short"] = "l",
  v = "l",
  vv = "Álvarez"
}

Observed: Álvarez (with A-acute) is interpreted as a "isVon" particle by SILE's nbibtex-derived name parsing method...

Expected: family name Álvarez-Sancho as in the case without accent.

Hint: That nbibtex-derived code is ugly as hell (looks like bad C code anyway), and would need a good refactor / entire rewriting.

Metadata

Metadata

Assignees

Labels

bugSoftware bug issue

Type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions