Special characters - replace

Hello,
I have special characters in my fields like ã, á, à and others (in portuguese language we use them). There is a any to replace them? I tried to used ruby gsub like this "event.set('subProcessName', event.get('subProcessName').gsub(/ã/, 'a'))" to replace the character "ã" to "a". But some characters, when I copy to .conf file, they are shown like this " event.set('subProcessName', event.get('subProcessName').gsub(/▒| /, 'a'))".

Thank you,
Francisca Vale Lima

input { generator { count => 1 lines => [ 'I have special characters in my fields like ã, á, à and others' ] } }
filter {
    ruby { code => 'event.set("message", I18n.transliterate(event.get("message")))' }
}

gets me

   "message" => "I have special characters in my fields like a, a, a and others",
1 Like

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.