How do I tell a 5.2 from a 5.9

5.9 Magnums usually are a "Z " code,on the VIN plate.I can't remember when the Feds went from the 5th VIN digit,to the 8th digit on engine classification.