Dream Weaving system I have been in the UTF8 version, recently tested a set of templates, but uploaded to the server to find the system basic settings can not be saved in Chinese, the internet did not find a good way to look at yourself, found that the problem of website coding, My UTF8 dream is no problem under the php5.4, so I want to transcode the characters in my form.
Background-System basic parameters cannot save the Chinese modification method:
Dede\templets\sys_info.htm Inside Search
Htmlspecialchars ($row [' Value '])
Replaced by
Htmlspecialchars ($row [' Value '],ent_compat, ' gb2312′ ')
If you find that there are other pages, there is no way to save Chinese, it is best to search for Htmlspecialchars ($row [' value ') in Dreamweaver, and then bulk replace Htmlspecialchars ($row [' Value '], Ent_compat, ' gb2312′ ', so you can ensure that the system's form is not a problem.
However, this method of modification, the editor of the Chinese No way, but also to modify the editor, the method is:
include/ckeditor/ckeditor_php5.php file
Find Code
$out = "<textarea name=\" ". $name. “\”” . $attr. ">". Htmlspecialchars ($value). "</textarea>\n";
Change to:
$out = "<textarea name=\" ". $name. “\”” . $attr. ">". Htmlspecialchars ($value, Ent_compat, ' gb2312′). "</textarea>\n";
There are also labels that are not displayed and are modified as follows:
1, dede/article_add.php and dede/article_edit.php will
$title = Htmlspecialchars (CN_SUBSTRR ($title, $cfg _title_maxlen));
Change into
$title = Htmlspecialchars (CN_SUBSTRR ($title, $cfg _title_maxlen), Ent_compat, ' GB2312 ');
After all this, we found that the core-batch maintenance-tag tag management in the Chinese label all do not show, it is really troublesome, modify the method:
Open/dede/templets/tags_main.htm
Found it:
$fields [' tag '] = Htmlspecialchars ($fields [' tag ']);
Replaced by
$fields [' tag '] = Htmlspecialchars ($fields [' tag '],ent_compat, ' gb2312′ ');
With this modification, the tag tag is displayed.
Such a modification, in php5.4 under the GBK version of the Dream will not appear coding problem.
Related to not show where there are editor content, system basic parameters, link module, please refer to the modification.