Template:Uic8/doc

The aim of this template is to extract the 7-digit UIC station code from and convert it to the full 8-digit code.

It uses a specific Luhn algorithm to calculate the 8th digit.