I'm editing a copy of unsrt.bst to change the format of the author's names in FUNCTION {format.names}, by replacing:
s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := with:
s nameptr "{vv }{ll}{, f.}{ jj}" format.name$ 't := For some reason, the *.bbl file produced by BibTeX now shows MartÃnez where it was a Martínez, so PDFLaTeX complains. My preamble includes the \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc} lines.
The problem arises when leaving just f or f. instead of ff, even with no change in the ordering. What's happening?
Mart{\'i}nezfftofchange :(ff, BibTeX didn't have to apply any formatting to any parts of the full name complex. (It did, obviously, have to parse the full name in order to determine theff,vv,ll, andjrcomponents.) After you switch fromfftof., BibTeX does have to perform some formatting, and all bets are off as to what BibTeX will end up doing if you input the name'sllcomponent asMartínezinstead of asMart{\'i}nez.plain.bst, but as egreg says, BibTeX does not support non-ASCII-chars, so you cannot expectMartínezto work even though it generally works fine (or at least appears to work fine). I'd love to take a closer look at this though (I won't be able to offer a solution apart from the already suggestedMart{\'i}nez). Can you double-check that you can reproduce the issue in a new, empty folder and can you then give us a detailed instruction to reproduce the issue?unsrt.bst(as well asplain.bst) and the result was exactly the same: I got the expected output without any error or weird encoding issues.