+ small imp.

This commit is contained in:
kelson42 2010-04-14 16:27:52 +00:00
parent 9d92cec52d
commit 40042efe06
1 changed files with 3 additions and 4 deletions

View File

@ -4,18 +4,17 @@ using namespace std;
/* Remove accent */
std::string removeAccents(const char *text = NULL) {
char* out = NULL;
char* out = 0;
size_t out_length = 0;
if (!unac_string("UTF8", text, strlen(text), &out, &out_length)) {
std::string textWithoutAccent = text;
textWithoutAccent = string(out, out_length);
std::string textWithoutAccent = string(out, out_length);
free(out);
return textWithoutAccent;
}
if (text != NULL) {
return string(text);
return text;
}
return "";