Originally posted by troyz
Depends on what tool you're using to read the EXIF; the EXIF data structure contains numeric codes rather than a names. The EXIF reader has to look up the lens name from a table.
Pentax Tags
To get the name right your lens has to send a unique code (sometimes third-party manufacturers use the same code for different lenses or re-use the code for a Pentax lens) and the tool has to have the correct entry in its lens name table.
Troy is correct. Sometimes processing the file through a product like Adobe Lightroom will result in translation of the code to a lens model with that data added to the exif, though the name assignment is not always accurate. For example: my Sigma 50/2.8 EX DG Macro is tagged as a Pentax 50/2.8 Macro (would be that it were true

) by Lightroom because Sigma uses the id code for the Pentax lens.
Steve