Hi all

Here is a function to translate Unicode to gbk:

void CSocketsEngine::ConvUni2Gbk(const TDesC& original, TDes8& res)
{
return;
RFs aFileServerSession;
aFileServerSession.Connect();
TInt state=CCnvCharacterSetConverter::KStateDefault ;
CCnvCharacterSetConverter* iConv = CCnvCharacterSetConverter::NewLC();
if(iConv->PrepareToConvertToOrFromL(KCharacterSetIdentifierGbk,aFileServerSession)!=CCnvCharacterSetConverter::EAvailable)
User::Leave(KErrNotSupported);
iConv->ConvertFromUnicode(res, original, state) ;
aFileServerSession.Close();
CleanupStack::PopAndDestroy() ;
}

When I use it to do the translaton, the phone(N70) will restart itself.

I want to know the reason and how to resolve it.

Thanks!