|
| Index | Recent Threads | Unanswered Threads | List Polls | Public Albums | Who's Online | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 6 |
|
| Author |
|
|
Stranger Joined: May 25, 2006 Post Count: 4 Status: Offline |
السلام عليكم انا عندي مشكلة باللغة العربية عندما اضيف موضوع يخرج النص كله ؟؟؟؟؟؟؟؟؟؟؟؟، ماذا أفعل لكي يخرج النص سليم و شكرا لكم hi i install the forum ,and it is very good but when i write in arbic text will be ?????????/ what can i do Thank you |
||
|
|
Stranger Joined: May 25, 2006 Post Count: 4 Status: Offline |
hi I solve the problem first all table in dataBase must be UTF-8 if you want to create table in my SQL do like that CREATE TABLE `mvnforumattachment` ( `AttachID` int(11) NOT NULL auto_increment, `PostID` int(11) NOT NULL, `MemberID` int(11) NOT NULL, `AttachFilename` varchar(250) NOT NULL, `AttachFileSize` int(11) NOT NULL, `AttachMimeType` varchar(70) NOT NULL, `AttachDesc` text NOT NULL, `AttachCreationIP` varchar(20) NOT NULL, `AttachCreationDate` datetime NOT NULL, `AttachModifiedDate` datetime NOT NULL, `AttachDownloadCount` int(11) NOT NULL, `AttachOption` int(11) NOT NULL, `AttachStatus` int(11) NOT NULL, PRIMARY KEY (`AttachID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 then in class net.myvietnam.mvncore.util.GenericParamUtil in method getParameter do like that public static String getParameter(GenericRequest request, String param) { String ret = request.getParameter(param); ret = StringUtil.getUTF8String(ret); if (ret == null) ret = ""; return ret.trim(); } method getUTF8String is public static String getUTF8String(String strSrc) { String temp = null; try { if(strSrc != null){ char[] chrSrc = strSrc.toCharArray(); byte[] byteSrc = new byte[chrSrc.length]; for(int i=0; i < chrSrc.length; i++){ byteSrc = (byte)chrSrc; } temp = new String(byteSrc, "UTF-8"); } }catch(Exception e){ } return temp; } thats all ![]() |
||
|
|
Stranger Joined: Sep 18, 2006 Post Count: 9 Status: Offline |
i am Chinese~~ welcome visit my website www.qqhally.com/bbs |
||
|
|
mvnForum developer Joined: Jan 21, 2008 Post Count: 123 Status: Offline |
hi I solve the problem first all table in dataBase must be UTF-8 if you want to create table in my SQL do like that CREATE TABLE `mvnforumattachment` ( `AttachID` int(11) NOT NULL auto_increment, `PostID` int(11) NOT NULL, `MemberID` int(11) NOT NULL, `AttachFilename` varchar(250) NOT NULL, `AttachFileSize` int(11) NOT NULL, `AttachMimeType` varchar(70) NOT NULL, `AttachDesc` text NOT NULL, `AttachCreationIP` varchar(20) NOT NULL, `AttachCreationDate` datetime NOT NULL, `AttachModifiedDate` datetime NOT NULL, `AttachDownloadCount` int(11) NOT NULL, `AttachOption` int(11) NOT NULL, `AttachStatus` int(11) NOT NULL, PRIMARY KEY (`AttachID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 then in class net.myvietnam.mvncore.util.GenericParamUtil in method getParameter do like that public static String getParameter(GenericRequest request, String param) { String ret = request.getParameter(param); ret = StringUtil.getUTF8String(ret); if (ret == null) ret = ""; return ret.trim(); } method getUTF8String is public static String getUTF8String(String strSrc) { String temp = null; try { if(strSrc != null){ char[] chrSrc = strSrc.toCharArray(); byte[] byteSrc = new byte[chrSrc.length]; for(int i=0; i < chrSrc.length; i++){ byteSrc = (byte)chrSrc; } temp = new String(byteSrc, "UTF-8"); } }catch(Exception e){ } return temp; } thats all ![]() try this value for <database_url> in mvncore.xml if you use MySQL intead of modifying source code <database_url>jdbc:mysql://localhost/mvnforum?useUnicode=true&characterEncoding=utf-8&useOldUTF8Behavior=true</database_url>---------------------------------------- [Edit 1 times, last edit by megacb at Mar 13, 2008 9:48:03 AM] |
||
|
|
Stranger Joined: Feb 14, 2005 Post Count: 7 Status: Offline |
Hi, developer, I did a fresh install yesterday. try this value for <database_url> in mvncore.xml if you use MySQL intead of modifying source code <database_url>jdbc:mysql://localhost/mvnforum?useUnicode=true&characterEncoding=utf-8&useOldUTF8Behavior=true</database_url>I think this is default setting, but i can not work with it on mysql 5.0.51 and tomcat 6, everytime i insert chinese characters, i got exception, then I searched old post here, i found if i change the url to jdbc:mysql://localhost/mvnforum?useServerPrepStmts=false, i can post chinese successfully, but all the characters are displayed as "?" i know it could be mysql setting, but i have executed the command: alter database mvnforum character set utf8 collate utf8_general_ci; is this suppose to let mysql use utf-8. did i miss anything? |
||
|
|
mvnForum Developer Vietnam Joined: Oct 16, 2002 Post Count: 2956 Status: Offline |
i know it could be mysql setting, but i have executed the command: alter database mvnforum character set utf8 collate utf8_general_ci; Yes, this is MySQL config issue, not related to mvnForum. It is quite difficult to config MySQL to support UTF-8, please read more on the MySQL documentation ---------------------------------------- Minh Nguyen mvnForum Developer Want a free, open source Java Jsp/Servlet forum, get mvnForum at http://www.mvnForum.com http://www.DienDanLinux.org |
||
|
|
|
|
|
Current timezone is GMT Jan 7, 2009 5:39:17 PM |

