| Author |
Message |
SpritHansi
Newbie


Joined: May 02, 2008
Posts: 4
|
Posted:
Wed Nov 12, 2008 12:04 am |
|
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??  |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 375
|
Posted:
Wed Nov 12, 2008 4:49 am |
|
What encoding does your database use? |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Thu Nov 13, 2008 2:27 am |
|
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. |
| |
|
|
 |
SpritHansi
Newbie


Joined: May 02, 2008
Posts: 4
|
Posted:
Thu Nov 13, 2008 4:55 am |
|
My database use UTF-8...I think
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... |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Fri Nov 14, 2008 7:59 am |
|
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 |
|
|
 |
SpritHansi
Newbie


Joined: May 02, 2008
Posts: 4
|
Posted:
Fri Nov 14, 2008 9:07 am |
|
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.... |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 375
|
Posted:
Fri Nov 14, 2008 9:22 am |
|
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  |
| |
|
|
 |
SpritHansi
Newbie


Joined: May 02, 2008
Posts: 4
|
Posted:
Fri Nov 14, 2008 9:26 am |
|
Yes, my database is UTF-8
MySQL charset: UTF-8 Unicode (utf8)
 |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Fri Nov 14, 2008 10:29 am |
|
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? |
| |
|
|
 |
Slackervaara
Newbie


Joined: Nov 03, 2007
Posts: 127
|
Posted:
Tue Nov 18, 2008 2:45 am |
|
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. |
| |
|
|
 |
|
|