When working with different languages, what is the proper way to sub a string out in Rails?
Example (Czech Translation):
str = "pro více informací"
replace = "<em>více</em>"
str["více"] = replace
puts str
The problem I keep running into (and this is for multiple languages, not just Czech) is the following: IndexError (string not matched)
Is there a better way to do a string replacement? I know about gsub and sub, but both methods cause the following errors
.gsub! and gsub errors: RegexpError (invalid multibyte character)
.sub! and .sub errors: RegexpError (invalid multibyte character)