[JDEV] look for help about unicode in jabber system

Timothy Carpenter timbeau_hk at yahoo.co.uk
Fri Aug 16 16:05:48 CDT 2002


I do not think CHAR to UNICODE is the answer. CHAR is 8 bit, but UTF-8 is a
way of sending UNICODE without breaking 'text' streams with data that looks
like CR, LF EOF EOLN etc etc. RCSU is also another mechanism that is very
intelligent use of packing, processing and compromising between ASCII and
full 16-bit character sets, but I cannot recall if this protects text stream
handlers from shocks. UTF-8 is less compact, but simpler, with no sliding
windows.

To convert is not a huge task, to my memory - just a little masking and bit
shuffling...shame no one uses PASCAL, as apart from not using <NULL> end
tags for strings (yeah!), you can define structures to have conditional
contents nailed down to the bit position, and even crossing
byte/word/longword boundaries. Thus the data slots in without too much math
nonsense all over the place.

Maybe this is why many C programmers quail at the thought of binary
bit-packed headers and say they are unmaintainable. They probably are...in
C. ;-)

Tim

On 17/08/2002 12:38 pm, "ÕÅ Æé" <jabberjaist at hotmail.com> wrote:

> do the jabber system support to east aisa GLYPH images,chinese ,japanese
> and korea.I want
> my jabber server support to unicode of east aisa.but I get a trouble. my
> friend tell me.
> just below ,is it right ,or have a better way to resolve the problem.
> 
> 
> 6¦1Jabber uses UTF-8 encoding
> 6¦1We have not been facing any problems because we have been operating in the
> ASCII domain which is a subset of UTF-8.
> 6¦1We need to find some kind of encoding algorithm/API which converts Unicode
> to UTF-8 before we send out strings to the server and some kind of decoding
> Algorithm/API which does the opposite when we receive strings.
> 6¦1We need some kind of rendering mechanism has to make the mapping from
> unicode to the actual character.
> 6¦1
> 
> 6¦1There are a couple of Microsoft APIs called MultiByteToWideChar and
> CharToMultiByte
> 6¦1There is an Mlang API of Microsoft which has functions like
> ConvertStringToUnicode and ConvertUnicodeToString (I think this is our best
> bet. If we read this thoroughly we might be able to solve the problem)
> 
> 
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



More information about the JDev mailing list