Javascript encoding problems

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Javascript encoding problems

Postby ramon » Tue Oct 02, 2007 8:09 am


I'm running into a strange problem.

I have only ONE javascript message that is being garbled when displayed in the alert box.

All other javascript messages are ok...

I added a CDATA, removed it, and nothing changed.

Then I changed the character set to ISO (not sure if it's Latin-1, though), which converted special characters to HTML characters, but most special characters are not displayed in the HTML.

Server and page, as well as DB and connection are UTF-8 by default, so I don't know what may be causing this.

I played with the template and the translation to see if something fixed this.

Throughout the templates, the selectMergeUser.tpl is the only one with:

Code: Select all


All others, including links have:

Code: Select all


I assume it's because of the user names that have to be displayed.

When I change the selectMergeUser.tpl to:

Code: Select all


the message is correct, but usernames are not replaced, as the image below shows.

If I change to

Code: Select all

, no matter what I do to the locale file, the message is either truncated or not displayed at all, creating a javascript error.

Any ideas?
Merge users displaying correct characters, but no usernames
merge.users.mssg.html.jpg (17.69 KiB) Viewed 395 times
Example of correct javascript message
reviewer.decision.confirm.jpg (13.05 KiB) Viewed 397 times
Merge users confirmation message, with original code.
merge.users.mssg.jpg (17.54 KiB) Viewed 399 times

Return to “OJS Technical Support”

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest