Page Index Toggle Pages: 1
Topic Tools
Normal Topic Unicode message files in YaBB (Read 1,785 times)
andyjosh
YaBB Newcomer
*
Offline



Posts: 4
Unicode message files in YaBB
Aug 27th, 2007 at 1:51pm
Post Tools
Can someone help me understand how the messages are saved for unicode text encoding? This is what I am doing:
1. I have a javascript which intercepts the entered letter from English keyboard and translates to unicode and echoses on the screen.
2. The script works well with YABB and I have not problem with storing or displaying the character.

However, I am trying to read the post files and do some processing, but there seems to be some characters such as ߮  instead of normal html unicode Ӓ

How do I convert these Ӓ format characters to unicode?

THanks.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Unicode message files in YaBB
Reply #1 - Aug 27th, 2007 at 9:42pm
Post Tools
andyjosh... not sure if this is what you need, but here is previous thread for utf-8 Support
http://www.yabbforum.com/community/YaBB.pl?num=1181806630/0
  
Back to top
 
IP Logged
 
andyjosh
YaBB Newcomer
*
Offline



Posts: 4
Re: Unicode message files in YaBB
Reply #2 - Aug 28th, 2007 at 12:08am
Post Tools
Thanks John- thats not exactly what I am looking for. My unicode characters work fine in YaBB. I am looking to open to message files saved by YaBB, and extract unicode message out of it. It looks as though the saved characters are not unicode but some coding that YaBB uses.

However, I suspect the routines in Subs.pl might be all that I need.  I think if I can modify these two. Do you know how these work?

sub convToChars {
     $fcharno = $_[0];
     if ($fcharno > 255) {
           $tcharno = qq~\&\#$fcharno\;~;
     }
     return $tcharno;
}

sub ToChars {
     $_[0] =~ s/\[ch(\d{3,}?)\]/&convToChars($1)/eisg;
}
« Last Edit: Aug 28th, 2007 at 12:34am by andyjosh »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools