Categories > TinyButStrong general >

does TBS support chinese?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: h9n2
Date: 2003-07-22
Time: 16:25

does TBS support chinese?

when i using TBS to show mysql datas, Chinese appeal in wrong code.
How to solve it? thanks
By: Skrol29
Date: 2003-07-22
Time: 16:44

Re: does TBS support chinese?

Hi h9n2,

TBS uses the standard PHP function to retrieve MySQL data.
Your problem is probably much more a about MySQL with chinese charset than a TBS problem.

Are you able to display chinese text from MySQL without TBS ?
Did you tried to change the MySQL default charset into chinese ?
Interesting links :
http://forums.devshed.com/archive/4/2001/03/3/3254
http://seba.ulyssis.org/thesis
By: h9n2
Date: 2003-07-22
Time: 16:53

Re: does TBS support chinese?

thx your reply
in fact, i tryed just echo my data from mysql, that is ok! Chinese can display. but using TBS, it have problem again.
By: Skrol29
Date: 2003-07-22
Time: 17:04

Re: does TBS support chinese?

Can you post or send a piece of your PHP code and Html template and a piece of data, so that I can figure out what to do ?
By: h9n2
Date: 2003-07-22
Time: 17:26

Re: does TBS support chinese?

translation you are so nice!

index.php
<?

include_once("includs/tbs_class.php") ;

//Connexion to the database

//The file cnx_mysql.php contains the following lines :
  $cnx_id = mysql_connect('localhost','root','') ;
  mysql_select_db('bookdb',$cnx_id) ;

$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate("data.htm") ;
$TBS->MergeBlock("bk1",$cnx_id,"SELECT * FROM books") ;
mysql_close($cnx_id) ;
$TBS->Show() ;

?>

data.htm
<html>
<head>
<title>Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>

<body>
<table width="75%" border="1">
  <tr align="center" valign="middle" bgcolor="#CCCCCC">
    <td width="27%">Ref_id</td>
    <td width="43%">Bname</td>
    <td width="14%">ISBN</td>
    <td width="16%">CPrice</td>
  </tr>
  <tr>
    <td>[bk1.ref_id;block=row]</td>
    <td>[bk1.bname]</td>
    <td>[bk1.book_id]</td>
    <td>[bk1.cprice]</td>
  </tr>
</table>
</body>
</html>
By: Skrol29
Date: 2003-07-22
Time: 17:37

Re: does TBS support chinese?

'Translation' is me, Skrol29 :)
I've forgoten to tune back my nickname after fr translation.

Could you also export some lines from the table 'books' with chinese char, so that I can reproduce the problem.
If you have PhpMyAdmin, just choose Export and then 'Only data'
By: h9n2
Date: 2003-07-22
Time: 17:53

Re: does TBS support chinese?

My nickname always is h9n2

INSERT INTO books VALUES ('R20059', '9789627548041', 'PHYSICS beyond 2000 Vol.1', '6', 'Raymond W.N. CHAN', '&#20553;&#33021;', '5');
INSERT INTO books VALUES ('R20078', '9780195915389', '&#29983;&#27963;&#33287;&#31185;&#23416;', '1', '&#26460;&#31177;&#31098;', '&#29275;&#27941;&#22823;&#23416;', '8');
INSERT INTO books VALUES ('R60092', '9789623427678', '&#20114;&#21205;&#20013;&#22283;&#27511;&#21490;&#65367;&#65294;&#65346;', '&#65297;', '&#33865;&#23567;&#20853;', '&#25991;&#36948;&#20986;&#29256;(&#39321;&#28207;)&#26377;&#38480;&#20844;&#21496;', '8');
INSERT INTO books VALUES ('R80030', '9789627149873', '&#21516;&#21109;&#26032;&#22825;&#22320;&#31532;&#19968;&#20874;W.B', '&#65297;', '&#23447;&#25945;&#25945;&#32946;&#20013;&#24515;&#20986;&#29256;', '&#23447;&#25945;&#25945;&#32946;&#20013;&#24515;', '8');
INSERT INTO books VALUES ('R20072', '9789623251846', '&#26371;&#32771;&#38988;&#35299;&#31995;&#21015;&#25976;&#23416;', '5', '&#39321;&#28207;&#32771;&#35430;&#21450;&#30740;&#31350;', '&#39321;&#28207;&#32771;&#35430;&#21450;&#30740;&#31350;', '8');
INSERT INTO books VALUES ('R60068', '9789621980205', 'mathemtids today', '3', 'K.S.LEUNG', 'Canotta', '10');
INSERT INTO books VALUES ('R70005', '9780195915402', '&#29983;&#27963;&#33287;&#31185;&#23416;', '2', '&#26460;&#31177;&#31098;', '&#29275;&#27941;&#22823;&#23416;', '10');
INSERT INTO books VALUES ('R70066', '9780195915396', '&#29983;&#27963;&#33287;&#31185;&#23416;', '1', '&#26460;&#31177;&#31098;', '&#29275;&#27941;&#22823;&#23416;', '10');
INSERT INTO books VALUES ('R40096', '9789621980007', 'Mathematics Today 1A', '1', 'K.S. Leung M.K. Lai', 'Canotta', '10');
INSERT INTO books VALUES ('R40022', '9780195906110', '&#20013;&#22283;&#35486;&#25991;', '1', '&#24067;&#35029;&#25991;', '&#21855;&#24605;', '10');
INSERT INTO books VALUES ('R70008', '9789627149866', '&#21516;&#21109;&#26032;&#22825;&#22320;', '1', '&#24429;&#22521;&#21083;', '&#23447;&#25945;&#25945;&#32946;&#20013;&#24515;', '10');
INSERT INTO books VALUES ('R50008', '3939150000033', '&#20013;&#22283;&#27511;&#21490;&#32722;&#20316;&#31807;3&#19979;', '3', '&#29694;&#20195;&#25945;&#32946;&#30740;&#31350;&#31038;&#20986;&#29256;', '&#29694;&#20195;&#25945;&#32946;&#30740;&#31350;&#31038;&#20986;&#29256;', '10');
INSERT INTO books VALUES ('R60057', '9789625701394', 'P.A.C', '&#65305;&#65301;', '&#39321;&#28207;&#32771;&#35430;&#23616;', '&#39321;&#28207;&#32771;&#35430;&#23616;', '10');
INSERT INTO books VALUES ('R20039', '9789620323676', '&#32654;&#34899;&#33287;&#35373;&#35336;&#19977;&#19979;', '3', '&#37101;&#29577;&#32654;', '&#40613;&#32654;&#20523;', '10');
INSERT INTO books VALUES ('R60015', '9780195915389', '&#29983;&#27963;&#33287;&#31185;&#23416;', '1', '&#26460;&#31177;&#31098;', '&#29275;&#27941;&#22823;&#23416;', '10');
INSERT INTO books VALUES ('R60065', '9780195906127', '&#20013;&#22283;&#35486;&#25991;&#31532;&#20108;&#20874;', '1', '&#24067;&#35029;&#25991;', '&#21855;&#24605;', '10');
INSERT INTO books VALUES ('R50020', '9789622791633', 'Physical Chemistry', '6', 'C.Y.Tong', 'Greenwood Press', '10');
By: h9n2
Date: 2003-07-22
Time: 18:04

Re: does TBS support chinese?

hey! seem here also can't display chinese
By: Skrol29
Date: 2003-07-22
Time: 20:11

Re: does TBS support chinese?

hi,

Sorry but I also need your table structure.
(Export, Only Strucure)

Could you also send me the data by email so there will be no convertion problem.
If you could had a screen shot of the INSET INTO statements you have in your PC so that I will be able to know when char set is ok.

I hope I don't ask too much.
By: Skrol29
Date: 2003-07-25
Time: 13:47

Re: does TBS support chinese?

Thanks h9n2 for your help and for the files you sent to me.

The html conversion of TBS doesn't support charset with more that one byte per character (Unicode, chinese, arabic, ....).

The next version of TBS will gonna bring this.
By: &#20892;&#27665;
Date: 2003-07-28
Time: 11:21

&#25105;&#20063;&#22312;&#30896;&#21040;&#36825;&#20010;&#38382;&#39064;&#65292;&#19981;&#36807;&#25105;&#24050;&#32463;&#35299;&#20915;&#20102;

QQ:15079678
By: hiro
Date: 2003-11-22
Time: 05:49

Re: does TBS support chinese?

Hi there. I am using TBS for a php Japanese-English dictionary, all in Unicode (UTF-8).
When will the next version of TBS be out? I really would like to use it, but need the double-byte character support.

Thanks.
By: Skrol29
Date: 2003-11-23
Time: 14:36

Re: does TBS support chinese?

Hello Hiro,

Ne next version is ready nut the doc is not.
I can send the tbs_class.php file if you want.
By: hiro
Date: 2003-12-03
Time: 00:15

Re: does TBS support chinese?

Thanks, but not a hurry - I'll wait for the release. Thanks very much.