Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
SpritHansi
Newbie
Newbie



Joined: May 02, 2008
Posts: 4

PostPosted: Wed Nov 12, 2008 12:04 am Reply with quote

Hi!
I'm from Norway, and have problems with norwegian characters in the topic field. I have changed from ISO to UTF-8 in functions.php, but it still shows some strange characters.

Any help?? Smile
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 401

PostPosted: Wed Nov 12, 2008 4:49 am Reply with quote

What encoding does your database use?
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Thu Nov 13, 2008 2:27 am Reply with quote

This gives correct topic in Swedish with non-ascii letters like .

Open in modules/HTML_Newsletter/admin/admin_send_mail.php in a decent texteditor like Crimson.

At top of this file and immediately after the first line:
<?php
Add this line:
header("Content-Type: text/html; charset=iso-8859-1");

Save the file and upload it.
 
View user's profile Send private message
SpritHansi
Newbie
Newbie



Joined: May 02, 2008
Posts: 4

PostPosted: Thu Nov 13, 2008 4:55 am Reply with quote

My database use UTF-8...I think Rolling Eyes

I've updatet admin_send_mail.php, but it dowsn't help...
I use the version which comes with RavenNuke v2.30. I think it is the HTML-Newsletter v1.3...
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Fri Nov 14, 2008 7:59 am Reply with quote

Definitely do not add the header() code at the top of this script as that is already taken care of by RavenNuke.

Unfortunately, RavenNuke, and this module, is not UTF-8 compliant.

What do you have for your _CHARSET that is defined within language/lang-?????.php file?

_________________
To err is human, but when the eraser wears out ahead of the pencil, youre overdoing it.
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
SpritHansi
Newbie
Newbie



Joined: May 02, 2008
Posts: 4

PostPosted: Fri Nov 14, 2008 9:07 am Reply with quote

OK. I've removed the header-code...

In the language file, it was defined ISO-8859-1. I changed it to UTF-8. but it didn't help....
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 401

PostPosted: Fri Nov 14, 2008 9:22 am Reply with quote

Make sure you know what character set your database is using before you go any further or you will just end up running around in circles with this. You will never get a square pin to fit in a round hole if that hole is really a triangle Smile
 
View user's profile Send private message
SpritHansi
Newbie
Newbie



Joined: May 02, 2008
Posts: 4

PostPosted: Fri Nov 14, 2008 9:26 am Reply with quote

Yes, my database is UTF-8
MySQL charset: UTF-8 Unicode (utf8)
Smile
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Fri Nov 14, 2008 10:29 am Reply with quote

My database has also charset UTF-8, BUT the tables are collationated to latin1_swedish_ci, which means that the text in the database is ISO-8859-1. ISO-8859-1 works for my site all right.

I have earlier tried to post with non-ascii text in topic, but it failed. With the header included it worked very well. I think it might be possible to change the code for Topics in admin_send_mail.php.
$msnl_sTopic = stripslashes( FixQuotes( $ftopic ) );
Maybe it can be changed so non-ascii letters are allowed?
 
View user's profile Send private message
Slackervaara
Newbie
Newbie



Joined: Nov 03, 2007
Posts: 127

PostPosted: Tue Nov 18, 2008 2:45 am Reply with quote

I have a new suggestion for fix that also works for me.

In admin_send_mail.php find this line.

$msnl_sTopic = stripslashes( FixQuotes( $ftopic ) );

Change to:

$msnl_sTopic = ( $ftopic );

stripslashes causes problem with non-ascii letters and therefore I removed it. Stripslashes un-quotes a quoted string.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunch
linear-bunch
linear-bunch