Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
MentalMind #1
User title: Mental Mind
Member since Apr 2014 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Loggin with Stylish Jid
Hello Alex,

Can i login Stylish Jid [ support utf-8] through Agsxmpp . if yes thn tell me how can it possible .
This post was edited on 2014-05-01, 08:16 by MentalMind.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
What is a "stylish" Jid?
Avatar
Alex #3
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yes XMPP is fully Unicode compatible.
But you have to StringPrep the user input. Which normalizes all Unicode characters and checks for invalid or replacement characters.
Alex
Avatar
MadProg #4
Member since Dec 2014 · 7 posts
Group memberships: Members
Show profile · Link to this post
What is StringPrep the user input?

can u give me code?
 how to login UTF-8 JID
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The USername property does this automatically for you.

Here is the code of it:

/// <summary>
/// the username that is used to authenticate to the xmpp server
/// </summary>
  1. public string Username
  2. {
  3.     get { return m_Username; }
  4.     set
  5.     {
  6.         // first Encode the user/node
  7.         m_Username = value;
  8.  
  9.         string tmpUser = Jid.EscapeNode(value);
  10.  
  11.         if (value != null)
  12.             m_Username = Stringprep.NodePrep(tmpUser);
  13.         else
  14.             m_Username = null;        
  15.     }                
  16. }

of course you can use the NodePrep and JidEscape function also somewhere else in your codes.

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:
Forum: agsXMPP RSS