Fórumok

Velocity character encoding

Mister Stones, módosítva 15 év-val korábban

Velocity character encoding

New Member Bejegyzések: 18 Csatlakozás dátuma: 2007.05.22. Legújabb bejegyzések
Hi
I have been trying to solve a problem with my theme, i have some custom logic in a velocity file and when i have specific charaters in the file they are all displayed scrambled, those charaters are a specific iso-8859-1 char but i cant get them to be displayed correctly, it looks like some setting is on utf-8 but i dont know what is causing this, all help needed.

best regards
thumbnail
Andrey Kazantsev, módosítva 14 év-val korábban

RE: Velocity character encoding

Junior Member Bejegyzések: 53 Csatlakozás dátuma: 2009.02.17. Legújabb bejegyzések
I've the same problem. Is solution exist?
Prathibha h m, módosítva 14 év-val korábban

RE: Velocity character encoding

Junior Member Bejegyzések: 74 Csatlakozás dátuma: 2009.09.17. Legújabb bejegyzések
Could anybody find the solution for this?

Please let me know... it wud be helpful.

Thanks
gerald hemmers, módosítva 14 év-val korábban

RE: Velocity character encoding

Junior Member Bejegyzések: 93 Csatlakozás dátuma: 2008.05.13. Legújabb bejegyzések
Can't you just use a find and replace in vm. then you can replace the characters with html complaint ones or is this not what your looking for ?

For example:
#set($mystring = $mystring.replaceAll("\?", "%3F"))
thumbnail
Pranoti Nandurkar, módosítva 8 év-val korábban

RE: Velocity character encoding

Junior Member Bejegyzések: 48 Csatlakozás dátuma: 2012.02.03. Legújabb bejegyzések
Does any one got solution for this?

#set($mystring = $mystring.replaceAll("\?", "%3F")) will not work in every scenario.

I Have written the velocity Template which is fetching the categories from the data base. But while displaying It is not displaying special correctors.
For eg: If Category in the DB is my_category(new) In web content it is showing my category new .

It seems that it has some issues with Encoding. I need to add UTF-8. But I am not sure where I need to add it so that my structure or template can take encoding from it.