From d77f0fd2a2d4749d75539d6c79adc05ed7e4423a Mon Sep 17 00:00:00 2001 From: Pawel Tomak Date: Tue, 27 Apr 2010 19:49:55 +0200 Subject: [PATCH] tag editor: do not capitalize letters after non-ascii chars --- src/tag_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index c22870c2..e428367d 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -998,11 +998,11 @@ std::string TagEditor::CapitalizeFirstLetters(const std::string &s) if (s.empty()) return ""; std::string result = s; - if (isalpha(result[0])) + if (!isspace(result[0])) result[0] = toupper(result[0]); for (std::string::iterator it = result.begin()+1; it != result.end(); ++it) { - if (isalpha(*it) && !isalpha(*(it-1)) && *(it-1) != '\'') + if (!isspace(*it) && isspace(*(it-1)) && *(it-1) != '\'') *it = toupper(*it); } return result;