Using a name using Liquid doesn't work with special characters

I have no experience with liquid.

I am working on email newsletter templates and I have a fluid array that outputs the username and uses it. My problem is that this company is Norwegian and we have special characters like æ, ø and å. When they are involved, the code also swallows that letter: for example, Jørgen (instead of Jørgen), is there any way to do this?

I also have a scenario where the user has a dash-separated double name; Jan-Thomas, Jan-Thomas gets it. Is there anyway to include this in the fluid code as well?

Greetings {% if user.name.size> 0%} {{user.name | split: "" | first | capize}} {% else%} traveler {% endif%}.

+3


source to share


1 answer


Since Liquid is a Ruby-based templating language, I think it has the same limitation for the capitalize

Ruby string class:

Case conversion

valid only in ASCII area.



http://ruby-doc.org/core-2.2.2/String.html#method-i-capitalize

+1


source







All Articles