PHP-Nuke Services - Addons, Modules, Blocks Vizitati www.westdesign.ro Select Interface Language:EnglishRomanian
  Login or Register HomeForumsDownloadsYour AccountWeb LinksContact   
SectionsShow\Hide
MultiheadlinesShow\Hide
LoginShow\Hide
~ Welcome, alien
Nickname Password
(Register)

~ Membership:

Greetings to the newest member jincesoft
~ New Today: 0
~ New Yesterday: 0
~ Overall: 4306

~ People Online:
~ Visitors: 8
~ Members: 0
~ Total: 8
~Aikon is offline
on Yahoo Msg.
Link to meShow\Hide

aikons.net
Search in FeedsShow\Hide
Search in feeds
HistoryShow\Hide
On 21 May


Speed Up   Pause   Speed Down
DictionaryShow\Hide
Enter the word

Romanian users only

- aikons.net - PHP-Nuke Services Forum Index


Reply to topic Page 1 of 1
Nội Qui Diễn Đàn KimExpress.com
Message Author
Reply with quote
Post Posted: Sunday 23 August, 2009 12:52

Hi all,

I want my users can be able to type Vietnamese characters with accents mark which using unicode (UTF-Cool.

Here is the link: http://kimexpress.com/modules.php?name=News

As you can see the News title displays garbage characters, but the body and the extended body display correct characters.

In root/includes/meta.php, I modify the "charset" from _CHARSET to UTF-8:

from:

/*$metastring = "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";*/

$metastring = "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n";

And in root/languages/language.php, I modify:

from
define("_CHARSET","ISO-8859-1");

to
define("_CHARSET","utf-8");

But it doesn't display proper characters. Then I go into my database/nuke_stories table, and change the Collation collumn.

from
latin_swedish1_ci

to
utf_unicode_ci

and it still doesn't work.

Would you please help me to troubleshoot this bug?
Do I change correct files? correct structure?
Which files and code do I need to change?

This issue also repeat in my forum, when the title of each forum doesn't show right characters, but the body is OK.

Thanks a lot for your supporting.

View user's profile Send private message
Reply with quote
Post Posted: Sunday 23 August, 2009 18:18

Hello there.
This is not a bug. PHP-Nuke was ment/designed to work with ASCII[ISO whatever] encodings NOT with UTF-8. I think phpBB2 too.

However in plus of what you've done already the language file for vietnamese should be also UTF-8 converted.
Also on every form[in your case the form where you submit a story...I think it's modules/Submit_News/index.php for the Submit News or for the admin side of the News module modules/News/admin/index.php] you should change.
Code:
<form action=\"modules.php?name=$module_name\" method=\"post\">

with
Code:
<form action=\"modules.php?name=$module_name\" method=\"post\" enctype=\"multipart/form-data\" accept-charset=\"utf-8\">


respectively [modules/News/admin/index.php in adminStory(), previewAdminStory(), previewStory() functions]
Code:
<form action=\"".$admin_file.".php\" method=\"post\">

with
Code:
<form action=\"".$admin_file.".php\" method=\"post\" enctype=\"multipart/form-data\" accept-charset=\"utf-8\">

In other places too[basically wherever you have a form you should do the above and have changed the respective field in the mysql database to utf_unicode_ci].

View user's profile Send private message Visit poster's website
Display posts from previous:
Reply to topic Page 1 of 1
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
  


Page Generation: 0.55 Seconds