equal
deleted
inserted
replaced
17 |
17 |
18 |
18 |
19 |
19 |
20 |
20 |
21 // INCLUDE FILES |
21 // INCLUDE FILES |
|
22 #include <escapeutils.h> |
|
23 |
22 #include "XdmEngine.h" |
24 #include "XdmEngine.h" |
23 #include "XdmNodeFactory.h" |
25 #include "XdmNodeFactory.h" |
24 #include "XdmNodeAttribute.h" |
26 #include "XdmNodeAttribute.h" |
25 |
27 |
26 // ---------------------------------------------------------- |
28 // ---------------------------------------------------------- |
140 // |
142 // |
141 // ---------------------------------------------------- |
143 // ---------------------------------------------------- |
142 // |
144 // |
143 EXPORT_C void CXdmNodeAttribute::SetAttributeValueL( const TDesC8& aAttributeValue ) |
145 EXPORT_C void CXdmNodeAttribute::SetAttributeValueL( const TDesC8& aAttributeValue ) |
144 { |
146 { |
|
147 // change to UNICODE from UTF8 format |
|
148 HBufC* unicode = EscapeUtils::ConvertToUnicodeFromUtf8L( aAttributeValue ); |
|
149 CleanupStack::PushL( unicode ); |
|
150 |
145 #ifdef _DEBUG |
151 #ifdef _DEBUG |
146 iXdmEngine.WriteToLog( _L8( "CXdmNodeAttribute::SetAttributeValueL() - Value: %S" ), |
152 iXdmEngine.WriteToLog( _L8( "CXdmNodeAttribute::SetAttributeValueL() - Value: %S" ), |
147 &aAttributeValue ); |
153 unicode ); |
148 #endif |
154 #endif |
149 delete iAttributeValue; |
155 delete iAttributeValue; |
150 iAttributeValue = NULL; |
156 iAttributeValue = NULL; |
151 iAttributeValue = HBufC::NewL( aAttributeValue.Length() ); |
157 iAttributeValue = HBufC::NewL( unicode->Length() ); |
152 iAttributeValue->Des().Copy( aAttributeValue ); |
158 iAttributeValue->Des().Copy( *unicode ); |
|
159 CleanupStack::PopAndDestroy( unicode ); |
153 } |
160 } |
154 |
161 |
155 |
162 |