diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/src/presenceplugindata.cpp --- a/simpledatamodeladapter/src/presenceplugindata.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/src/presenceplugindata.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -48,7 +48,7 @@ #include #include #include - +#include #include "presenceplugindata.h" #include "presenceplugincommon.h" @@ -1460,7 +1460,22 @@ TBool updateCache( ETrue ); - HBufC* cacheUri = ResolveCacheXspIdentifierL( aPresentityId ); + // Decode encoded username (spaces to %20). + HBufC* decodedUsername = EscapeUtils::EscapeDecodeL( aPresentityId ); + CleanupStack::PushL( decodedUsername ); + + // convert to 8 bit version + HBufC8* tmp = HBufC8::NewLC( decodedUsername->Length() ); + tmp->Des().Copy( *decodedUsername ); + + // convert to unicode + HBufC* userName16 = + EscapeUtils::ConvertToUnicodeFromUtf8L( tmp->Des() ); + + HBufC* cacheUri = ResolveCacheXspIdentifierL( userName16->Des() ); + CleanupStack::PopAndDestroy( tmp ); + CleanupStack::PopAndDestroy( decodedUsername ); + delete userName16; CleanupStack::PushL( cacheUri ); DP_SDA(" -> WriteStatusToCacheL - read previous values from cache");