×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    49

    HTTP transaction query

    Hi all,
    I am working on S60 3rd edition. I am using the HTTP engine present in forum nokia to carry out get and post transaction. In this regard i have a few queries. I am giving relevant parts of the code.
    Code:
    void CHttpEngine::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
    {
       ....
    
      case THTTPEvent::EGotResponseBodyData:
        {
    
           // Get text of response body
    	MHTTPDataSupplier* dataSupplier = aTransaction.Response().Body();
    	TPtrC8 ptr;
    	dataSupplier->GetNextDataPart(ptr);
    
    	// Convert to 16-bit descriptor
    	HBufC* buf = HBufC::NewLC(ptr.Length());
    	buf->Des().Copy(ptr);
    
    		// Append to iResponseBuffer
    	if (!iResponseBuffer)
    	  {
    	    iResponseBuffer = buf->AllocL();
    	  }
    	else
    	{
    	  iResponseBuffer = iResponseBuffer->ReAllocL(iResponseBuffer->Length() + buf->Length());
    	  iResponseBuffer->Des().Append(*buf);
    	}
    
    	// Release buf
    	CleanupStack::PopAndDestroy(buf);
    
    	// Release the body data
    	dataSupplier->ReleaseData();
          
     
          
          }
          break;
          ......
    
    }
    I am accumulating the response that i am getting from the server in 16 bit descriptor (iResponseBuffer).
    Now i am printing the respose using Information note. I have tested this application and it displays proper
    data. Now i want to make the application multilingual (English and Hindi). Now using localization technique
    i am displaying the static Hindi or English data. But i need to display the dynamic data that comes from the server in Hindi or english depending on what the server is sending. Now if the server sends Hindi data,
    and using the information note i display the iResponseBuffer, will it display in Hindi or do i need to do
    anything else to display this dynamic data in Hindi.

    thanks and regards,
    kkc

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: HTTP transaction query

    Try to use class CCnvCharacterSetConverter ( see http://www.forum.nokia.com/document/...FDFFC812B.html )

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: HTTP transaction query

    Also make sure that the device has fonts defining characters for the language, if it does not, then all missing characters are shown as empty squares.

Similar Threads

  1. http crash at end of transaction
    By s4028469 in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-02-15, 12:54
  2. waiting for HTTP POST response
    By gemilib in forum Symbian
    Replies: 3
    Last Post: 2007-11-19, 17:00
  3. SocketServer panics with Des16Align after complete HTTP transaction
    By d_wasser in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-01-19, 16:22
  4. Size of HTTP query
    By henson2K in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2004-11-06, 20:43
  5. Http Transaction without PopUp
    By deepikamulani in forum Symbian
    Replies: 1
    Last Post: 2004-07-13, 12:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×