Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Esofter #1
Member since Oct 2009 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: Package encoding
How I can set package encoding(utf-8)?

Thank you.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Sorry but I don't undestand what you mean packet encoding. Can you please elaborate?

XMPP is using a subset of XML, and the only encoding defined in XMPP is UTF-8.

Alex
Avatar
Esofter #3
Member since Oct 2009 · 20 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
Sorry but I don't undestand what you mean packet encoding. Can you please elaborate?

XMPP is using a subset of XML, and the only encoding defined in XMPP is UTF-8.

Alex

Some parameters I get from the database. When I pass their to server, they coming with not utf-8 encoding.
I think that complete package must be in utf-8, but  it is already, I must set encoding to parameters only. Is it true?
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Maybe you get the parameters in the wrong encoding from the database.
Posting some code snippets would help. But MatriX is converting everything to UTF-8 before sending over the wire, and then back from UTF-8 on receive. There should be no problem in MatriX.

Alex
Avatar
Esofter #5
Member since Oct 2009 · 20 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
Maybe you get the parameters in the wrong encoding from the database.
Posting some code snippets would help. But MatriX is converting everything to UTF-8 before sending over the wire, and then back from UTF-8 on receive. There should be no problem in MatriX.

Alex

Before sendinf, I write package into log. And I see that parameters in cyrylic are not display correct. They should be in utf-8 than display will be correct.

What code snippets are you interest? Bulding pacckage?

public static Rpc getQuery(string cmdName, ArrayList arr)
        {
            Rpc x = new Rpc();
            MethodCall m = new MethodCall(cmdName, arr);          
            x.MethodCall = m;
            return x;
        }

Array arr contains element in cyrilic string(such as "???????????","????????").
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Esofter on 2010-09-09, 21:12:
1284055951
Are you sure that the Encoding of your logfile is correct?

Quote by Esofter on 2010-09-09, 21:12:
1284055951
No this code does not help.
Try to send a simple XMPP message with cyrillic characters to an existing XMPP client which supports Unicode and you will see that MatriX transmits the characters correct.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: