TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

tintin-2.00.1 #parse can't support BIG5

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
magicion



Joined: 08 Jun 2010
Posts: 2

PostPosted: Tue Jun 08, 2010 2:44 am    Post subject: tintin-2.00.1 #parse can't support BIG5 Reply with quote

When I use #parse to read BIG5 encoded string likes "一百".
tintin++ read this as single character.

I have fix it with following code.

diff -ruN tt/src/tokenize.c tt-patch/src/tokenize.c
--- tt/src/tokenize.c 2010-02-05 14:58:08.000000000 +0800
+++ tt-patch/src/tokenize.c 2010-06-08 09:36:40.874134499 +0800
@@ -305,10 +305,14 @@

char *get_arg_parse(struct scriptnode *token)
{
- static char buf[2];
+ static char buf[3];
+ memset(buf,0,3);

buf[0] = *token->data->arg++;
-
+ #ifdef BIG5
+ if(buf[0] & 0x80)
+ buf[1] = *token->data->arg++;
+ #endif
return buf;
}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Jun 08, 2010 7:11 am    Post subject: Reply with quote

Thanks. Fixed for 2.00.2 as well.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group