Print Page | Close Window

Character encoding issue after upgrading to 10.11

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=30277
Printed Date: 31 March 2026 at 4:32pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Character encoding issue after upgrading to 10.11
Posted By: iSec
Subject: Character encoding issue after upgrading to 10.11
Date Posted: 15 April 2012 at 7:37am
I have applied the latest update to my forum but I'm having a weird issue, where non-latin characters are not displayed correctly. The charset is set to 'UTF-8' but it's still messed up. What am i missing?

-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard



Replies:
Posted By: WebWiz-Bruce
Date Posted: 15 April 2012 at 4:49pm
Are you using a custom header?

If so this maybe over riding the character encoding that you set in your forum.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: iSec
Date Posted: 15 April 2012 at 5:08pm
Bruce, no I don't use a custom header. Also, it seems to be affecting the forum_posts.asp page alone, the topic page titles are ok, if that makes any difference. Please http://www.iamiraqi.com/forum/topic105.html" rel="nofollow - take a look here if you get a chance,

-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: WebWiz-Bruce
Date Posted: 15 April 2012 at 5:14pm
Could be a database issue.

Have you changed the collation in the database or restored the database from another server?

If the  collation has changed in the database the only fix maybe to roll back the database to before the upgrade and try again, but make sure that the database has the correct encoding (collation) before upgrading.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: iSec
Date Posted: 15 April 2012 at 5:16pm
No all I did was upload the new forum and went through the upgrade wizard to upgrade from 10.x...
I still have the old version of the forum and it's not affected. http://www.iamiraqi.com/forum-old" rel="nofollow - Here it is .


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: WebWiz-Bruce
Date Posted: 15 April 2012 at 5:19pm
Have you looked at the data directly in the database, has it changed in tblThread -> Message?

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: iSec
Date Posted: 15 April 2012 at 5:26pm
I just looked, and they do seem to be the same in the db. Why is it affecting one forum version and not the other though? I have not made any changes to the database:



Also here is the current collation type:




Bruce, when you say roll back the database, does that mean use a backup copy? Or is there another way?


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: iSec
Date Posted: 15 April 2012 at 6:29pm
Ok, this is weird... I fixed it by doing the following:

  1. Uploaded a fresh a copy of the forum
  2. Instead of going through the database wizard which automatically launches itself when attempting to access the newly uploaded forum copy, I copied the content of the 'database_settings.asp' file from the previous copy to the new copy, not just the database connection settings, but everything in that file. The issue is magically resolved!
I wonder why this happens, the database connection parameters were already there, but the issue doesn't go away until you have copied the content of the entire file from the previous copy.


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: rune
Date Posted: 15 April 2012 at 6:43pm
Well, you can't use the Latin1 collation to store persian letters.

Is your old db using this collation as well?  Then I'm surprised it ever worked.

Note: What you have shown is the collation of the database.  However, it is the collation of the actual field in the table that counts.  That is usually the same as the db collation, but it is possible to specify something else when the table is created.


Posted By: WebWiz-Bruce
Date Posted: 15 April 2012 at 9:36pm
I also suspect the database collation.

When new fields are added to a table the table is rebuilt, when this is done to the tblThread I suspect that when the table is rebuilt to add the new fields that the collation of the database causes the issue.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: iSec
Date Posted: 15 April 2012 at 9:51pm
Thanks guys. Yes, I agree the collation must be the issue... but according to a blog post by Microsoft, SQL_Latin1_General_CP1_CI_AS is the standard collation and supports many non-latin characters. At this point, and for future reference I have 2 questions:

1) In order to have UTF-8 as the collation of the db, which collation should be specified? I don't see 'UTF-8' as an option in the drop down within the DB properties
2) Should I leave it alone for now, since it's working -- or should I still make the correction on the collation?

Thanks!


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: rune
Date Posted: 15 April 2012 at 10:21pm
SQL server is not designed to use utf8. If you want to store unicode, the field must be defined as nvarchar. If the field is varchar, it depends on the code page of the collation which characters you can store. cp1256 for Persian, I think


Posted By: rune
Date Posted: 15 April 2012 at 10:25pm
If it is working, for god's sake leave it. Changing collation is hell.


Posted By: iSec
Date Posted: 16 April 2012 at 7:14am
Originally posted by rune rune wrote:

If it is working, for god's sake leave it. Changing collation is hell.

LOL. Copy that. 


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net