依然顯示唔到超大字庫集嘅生僻字
寫帖時若果有生僻字,發帖後嗰隻字後邊所有內容都會顯示唔到,睇吓有冇辦法解決? <P>下面咪有解决辦法囉,不過紛繁復雜又危險啫,免費嘅嘢就係噉,冇辦法。</P><P> </P>
<P><A href="http://bbs.cantonese.asia/viewthread.php?tid=7978&extra=page%3D1">http://bbs.cantonese.asia/viewthread.php?tid=7978&extra=page%3D1</A></P> 我對論壇呢個軟件唔熟,唔知將個字體改為宋體再加海峰嘅大字集唔知得唔得?? 希望微軟早日出粵文版操作系統啦。 <P>原帖由 <I>Ultra</I> 於 2007-10-8 00:02 發表 <A href="http://bbs.cantonese.asia/redirect.php?goto=findpost&pid=60512&ptid=8256" target=_blank><IMG onclick=zoom(this) alt="" src="http://bbs.cantonese.asia/images/common/back.gif" onload="attachimg(this, 'load')" border=0></A> 下面咪有解决辦法囉,不過紛繁復雜又危險啫,免費嘅嘢就係噉,冇辦法。 http://bbs.cantonese.asia/viewthread.php?tid=7978&extra=page%3D1 </P>
<P> </P>
<P> </P>
<P>唔支漢典論壇係唔係用呢種方法??漢典同樣係 <A href="http://www.discuz.net/" target=_blank><STRONG><FONT color=#0954a6>Discuz!</FONT></STRONG></A> <STRONG><EM><FONT color=#ff9d25>6.0.0</FONT></EM></STRONG></P>
<P><FONT color=black><STRONG>如果佢哋有其它辦法的話可以去話詢問一下!!</STRONG></FONT></P> <P><STRONG>呢個係喺 <A href="http://bugs.mysql.com/bug.php?id=14052">http://bugs.mysql.com/bug.php?id=14052</A> mysql官方網上睇到嘅由於我雞腸唔多掂,所以各位睇下係唔係有辦法解決論壇顯示唔到 unicode漢字??有人話 顯示唔到唔係discuz嘅bug而係mysql!</STRONG></P>
<P><STRONG></STRONG> </P>
<P><STRONG>Description:</STRONG><BR>At Wikipedia we have some data which contains high Unicode characters beyond the Basic<BR>Multilingual Plane (>65536). In UTF-8 encoding these take up 4 bytes; in UTF-16 they would<BR>be stored as a "surrogate pair" of two 16-bit pseudocharacters.<BR><BR>Currently MySQL's Unicode charset support doesn't seem to allow storing these characters<BR>in text-encoded fields when using UTF-8 to communicate to the server:<BR>* ucs2 stores four question marks "????" in place of the char<BR>* utf8 truncates the string at the point the char appears<BR><BR>Some quick testing indicates that I can store surrogate pseudocharacters if I explicitly<BR>code for them in pseudo-UTF-8, but this complicates communicating with the server.<BR><BR><STRONG>How to repeat:</STRONG><BR>Tested with PHP 5.1.0RC1:<BR><?php<BR>mysql_connect("localhost", "unitest");<BR>mysql_select_db("unitest");<BR>mysql_query("SET NAMES utf8");<BR>mysql_query("CREATE TABLE demo(<BR> wide VARCHAR(50) CHARACTER SET ucs2,<BR> utf VARCHAR(50) CHARACTER SET utf8,<BR> raw VARBINARY(50)<BR>)");<BR>$char = "\xf0\xa8\xa7\x80";<BR>mysql_query("INSERT INTO demo(wide,utf,raw) VALUES ('$char','$char','$char')");<BR>$result = mysql_query("SELECT * FROM demo");<BR>$row = mysql_fetch_array($result, MYSQL_ASSOC);<BR>foreach($row as $field => $val) {<BR> $match = ($val == $char) ? "OK" : "FAILED";<BR> print "$field: $match ($val)\n";<BR>}<BR>?><BR><BR>Outputs:<BR>wide: FAILED (????)<BR>utf: FAILED ()<BR>raw: OK (<BR><BR><STRONG>Suggested fix:</STRONG><BR>A sufficient compromise for our purposes would be for the ucs2 charset to be enhanced (or<BR>a second utf16 charset made available) to do encoding and decoding of UTF-16 surrogate<BR>pairs when communicating with the server in UTF-8.<BR><BR>So if we send the UTF-8 string: "\xf0\xa8\xa7\x80"<BR>It should interpret it as the UTF-16 string: "\ud862\uddc0"<BR>And on select we should get back UTF-8: "\xf0\xa8\xa7\x80"<BR><BR>Continuing to use UCS-2 collation semantics would be good enough for what we need; this<BR>would allow us to use collatable Unicode text fields for page titles and usernames without<BR>rare but existing data getting corrupted.</P>
頁:
[1]