infrabel / themes-gnap

Standardized build to produce web themes for use with GNaP.
http://gnap.io/
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Dealing with UTF-8 #56

Closed CumpsD closed 9 years ago

CumpsD commented 10 years ago

Currently, we serve .json files with translations. These files can contain characters such as À, which should be saved as UTF-8 to work properly in the theme.

For some users, this is actually quite a big step (perhaps one that we can resolve with just having a yo translation generator). Some people will see their characters come out as question marks, and will try to replace them with html entities, requiring them to abandon the translate filter and use the directive, or have ng-bind-html everywhere (possibly unwanted)

Are there other things that can help us?

Most user friendly practice would be to let the user type in special characters without worrying, and then we somehow always interpret those files as UTF-8, or we let the server serve them with UTF-8 charset defined on it (always without BOM anyway)

CumpsD commented 9 years ago

Currently I added grunt-encoding to check if our files are UTF-8, it works but I opened 2 PRs to make it work properly under windows: