- docstring author_latexed;
- for (size_t n = 0; n < author.size(); ++n) {
- try {
- author_latexed += runparams.encoding->latexChar(author[n]);
- } catch (EncodingException & /* e */) {
- if (runparams.dryrun) {
- ods << "<" << _("LyX Warning: ")
- << _("uncodable character") << " '";
- ods.put(author[n]);
- ods << "'>";
- } else {
- LYXERR0("Ommitting uncodable character '"
- << docstring(1, author[n])
- << "' in change author name!");
- uncodable_author = author;
- }
- }
+ pair<docstring, docstring> author_latexed =
+ runparams.encoding->latexString(author, runparams.dryrun);
+ if (!author_latexed.second.empty()) {
+ LYXERR0("Omitting uncodable characters '"
+ << author_latexed.second
+ << "' in change author name!");
+ uncodable_author = author;