Vehicle Identification Numbers (VIN codes)/Check digit

This does not seem to work for Australian VIN numbers.

One element that is fairly consistent in VIN numbers is the use of position 9 as a check digit, compulsory for vehicles in North America and used fairly consistently even outside this rule except in the United Kingdom where the check digit is not used.

Method
The process for calculating a VIN check digit is as follows:
 * 1) Substitute each letter in the VIN with a digit according to the transliteration table below.
 * 2) Multiply each digit in the resulting number with its respective weight according to the table below.
 * 3) Sum the resulting products.
 * 4) Divide the sum by 11 and take the remainder. This remainder is the check digit. If the remainder is 10, use X as the check digit.

Transliterating the numbers
Transliteration consists of of substituting letters with digits according to the table below. I, O and Q are not present in the table because they cannot exist in a valid VIN. Numerical digits use their own values and are not changed by transliteration.

Weights used in calculation
The following is the weight factor for each position in the VIN. The leftmost digit is position 1. The 9th position is that of the check digit. It has been substituted with a 0, which will cancel it out in the multiplication step.

Worked example
Consider the VIN, where the underscore will be the check digit.


 * 1) Each letter in the VIN is substituted with a digit according to the transliteration table. Digits in the VIN are unchanged. This results in the Transliterated row.
 * 2) Each transliterated digit is multiplied with a weight according to the weights table. The weights for each position are reproduced here in the Weights row. Elementwise multiplication results in the Products row.
 * 3) The products are summed to 351.
 * 4) The sum 351 is divided by 11, yielding a remainder of 10.
 * 5) Since the remainder is 10, the check digit is X.

The check digit is added to the VIN:.

The VIN consisting of  (seventeen 1's) has a valid check digit. This can be used as a test case to verify a check digit algorithm.