Jump to content
TNG Community
r4

Incorrect Special Characters Display in TNG-php-Generated Text

Recommended Posts

r4

I installed TNG 10.1.3 recently. Added languages German and Spanish. Problem occurs in both my browsers, Internet Explorer and Chrome. OS is Win7. Hosting is Windows Plesk. When a special character occurs in German or Spanish text (like ä, ü, ñ) it is replaced by two other special characters, but only when this text is generated by a TNG php module. Text I enter directly in the various languages is reproduced correctly (I have not imported any data), such as the lorem ipsum ... on the home page. I am using Template 5. Setup >> Configuration >> General Settings >> Language:

Language Folder: German-UTF8; Character set: UTF-8 // Language Folder: English-UTF8; Char set: UTF-8; Language Folder: Spanish-UTF8; Char Set: UTF-8.

Website is here: http://rad129.net/TNG/index.php . Change to either German or Spanish and see problem near bottom (2nd paragraph) of Welcome message. I generated the large first paragraph (no display problem); the 2nd short paragraph is TNG - generated.

Share this post


Link to post
Share on other sites
theKiwi

Something isn't as you describe above - after I have changed languages through the 3 choices it all started to show correctly, and upon looking at the page source code see that the character set was ISO-8859-1 rather than UTF-8 as you say above.

But actually now it's the first paragraph that is correct and the second one has errors in it.

Are you still changing eh settings?

The main thing you didn't note is what is the collation of the database that you are using? To find this out go to your cPanel and look at the actual tables in the database and see what is shown under the collation column for each field in the tables.

Roger

Share this post


Link to post
Share on other sites
r4

Thanks for your reply, Roger. The database collation is utf8_general_ci. I have not made any settings changes since I posted this message. Problem still exists as I described, and as you described as well: "the first paragraph [that] is correct and the second one has errors in it"; that's what I meant to say - sorry if it was not clear. Yes - char set in source code is ISO-8859-1; I have been unable to influence that; changing char sets in General Settings >> Language does not change the char set in the source code as displayed by the browser.

Share this post


Link to post
Share on other sites
theKiwi

Thanks for your reply, Roger. The database collation is utf8_general_ci. I have not made any settings changes since I posted this message. Problem still exists as I described, and as you described as well: "the first paragraph [that] is correct and the second one has errors in it"; that's what I meant to say - sorry if it was not clear.

​But when I first viewed the site, the character set said UTF-8 and it was the first paragraph that was messed up and the second one was correct. After I'd changed languages a few times it was the first paragraph that was correct and the second one was wrong and the character set was ISO-8859-1

 

Yes - char set in source code is ISO-8859-1; I have been unable to influence that; changing char sets in General Settings >> Language does not change the char set in the source code as displayed by the browser.

​There are 2 places to check for this

1 - TNG Admin ------> Setup ------> General Settings ------> Language

2 - the setting made for each language under TNG Admin ------> Languages

They all have to be set to UTF-8

Roger

Share this post


Link to post
Share on other sites
r4

Thanks again, Roger. I finally noticed the second place where I have to set UTF-8 under TNG Admin ---> Languages. After I did that, I still got ISO-8859-1, but after some more clicks back and forth, it changed to UTF-8 and is ok now. It's curious that there would be a delay; there must be some caches that needed to be updated first.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×