nesta
nesta copied to clipboard
It is impossible to use cyrillic or other UTF-8 symbols in articles and headers
invalid byte sequence in US-ASCII (Argument Error), models.rb:163
I made changes in Gemfile, as suggested here
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
Also I changed Google Font link accordingly to make it support cyrillic. And now it works perfectly.
Hope this helps.
Thanks for that – much appreciated.
I'm closing this, having just taken another look at what might have been causing it. On line 163 of models.rb
at this time, was this method call:
first_paragraph, remaining = contents.split(/\r?\n\r?\n/, 2)
Having read the SO thread that k2m30 posted, I'm imagining that Ruby was interpreting escape characters differently with whatever locale happened to be set on their system.
If this was a common problem I'm sure we'd have had more reports of it on this bug since then, so I'm going to close it.
I also like the approach recommended on SO of setting environment variables to modify the behaviour (i.e. no code changes required). So I'm closing it for now.