Message Boards

« Back to 3.- Suggestions

Modified source for UTF-8

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Modified source for UTF-8
Answer
6/5/12 6:49 PM
Hi Jack,

I have made a one line change to XMLPortletFactory.java on line 319
from
1template = Velocity.getTemplate("/Resources/VelocityTemplates_"+use_templates+"/PortletFiles/" + fileName);

to
1template = Velocity.getTemplate("/Resources/VelocityTemplates_"+use_templates+"/PortletFiles/" + fileName, [b]"UTF-8"[/b]);


I also changed Spanish, Italian and French unicode characters to "àèìòù" UTF-8 chars
in:
Resources/VelocityTemplates_common/PortletFiles/Portlet_Languages_es_properties.vm
Resources/VelocityTemplates_common/PortletFiles/Portlet_Languages_it_properties.vm
Resources/VelocityTemplates_common/PortletFiles/Portlet_Languages_fr_properties.vm

Now when compiling all characters appear in UTF-8 encoding correctly. Also ones that come from xml table creation.

I zipped changed files up and attached file.

Hope to you can use this in future releases...

Bye...
Attachments: XMLPortletFactory-UTF8.zip (9.0k)

RE: Modified source for UTF-8
Answer
6/6/12 6:13 AM as a reply to Davide Rossi.
Hola Davide,

Welcome to the project, this is a great contribution. A month ago I tried a small translation to Japanese, with no success. Probably this has something to do and will help everybody from now on. emoticon

Be sure I will include and upload your changes for the next release. Thank you very much, and any other contribution is most welcome.

Saludos, Jack.

Pd.: Last weekend I went to Rome and had a fantastic time, my feet still hurt because walking so much, to see so many incredible monuments. You have now a few more happy taxi drivers there.

RE: Modified source for UTF-8
Answer
6/6/12 7:42 AM as a reply to Jack A. Rider.
Ciao Jack,

It works great both chinese and japanese. I tried a few chars copied and pasted from articles on net in xml file tags and they appear correctly once copiled.
I am not a pro in java but am starting to figure things out and will be pleased to help more on this project that i find simple and functional compared to ohters that give headaches just to get them running.
There are two other small issues like one of the aui tags Legend has been removed in 6.1 and css created files are not recognized because the portlet name is not copied correctly.

Glad to here you were in Rome. Thats where I live. Next time give you a tour. Yes there is a lot of walking to do but so much to see.

Ciao, Davide

RE: Modified source for UTF-8
Answer
6/6/12 3:23 PM as a reply to Davide Rossi.
Hi Jack,
Portlet works fine but eclipse not recognizing files as UTF8 encoded - Will fix that. Probably coding is transformed during merge of VM templates.
Looking it up.
Will send corrected files.
Cheers.

Fixed attached corrected files.
Encoded Languages corectly changed a few lines in code.

Re-Cheers...
Attachments: PortletFiles.zip (10.4k)