»
         Symbian OS v9.3 »
         Symbian OS reference »
         C++ component reference »
         Application Services VERSIT »
         CVersitUnicodeUtils
      
      
      	   
      
      	   
      
         	   
         
         Location: 
            VUTIL.H
            
Link against: versit.lib
            
         
         
       
      
         
         
         
         Class CVersitUnicodeUtils
         
       
      
         class CVersitUnicodeUtils : public CBase;
         Description
         
         
            Versit Unicode utilities class.
         
         
         This enables conversion between Unicode and ISO character sets. 
         
         Derivation
         
         
         
            CBase - Base class for all classes to be instantiated on the heap
             
         
         
            CVersitUnicodeUtils - 
               Versit Unicode utilities class
             
         
         Members
         
         Defined in CVersitUnicodeUtils:
            
CharacterSetConverter(), ConvertStandardNameL(), CreateConverterL(), NarrowL(), NarrowLC(), StandardNameL(), WidenL(), WidenLC(), ~CVersitUnicodeUtils()
            
         
         
         Inherited from CBase:
            
Delete(),
            Extension_(),
            operator new()
         
         
       
      
         
         
         
         Construction and destruction
         
      
      
      
      
         IMPORT_C ~CVersitUnicodeUtils();
         Description
         
         Frees all resources owned by the object, prior to its destruction. 
         
         
       
      
      
      
      
         IMPORT_C HBufC8 *NarrowL(const TDesC &aDesC);
         Description
         
         Converts a string from Unicode to Code Page 1252.
         
         Parameters
         
         
            
               
                  
                     
                        const TDesC &aDesC | 
                        
                            The Unicode string to be converted.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        HBufC8 * | 
                        
                            A pointer to a Code Page 1252 string. The caller takes ownership.  
                         | 
                      
                   
                | 
            
         
          
      
      
         IMPORT_C HBufC8 *NarrowLC(const TDesC &aDesC);
         Description
         
         Converts a string from Unicode to Code Page 1252.
         
         Parameters
         
         
            
               
                  
                     
                        const TDesC &aDesC | 
                        
                            The Unicode string to be converted.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        HBufC8 * | 
                        
                            A pointer to a Code Page 1252 string. The pointer is left on the cleanup stack. The caller takes ownership.  
                         | 
                      
                   
                | 
            
         
          
      
      
         IMPORT_C HBufC *WidenL(const TDesC8 &aDesC8);
         Description
         
         Converts a string from Code Page 1252 into Unicode.
         
         Parameters
         
         
            
               
                  
                     
                        const TDesC8 &aDesC8 | 
                        
                            The Code Page 1252 string to be converted.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        HBufC * | 
                        
                            Pointer to the string converted into Unicode. The caller takes ownership.  
                         | 
                      
                   
                | 
            
         
          
      
      
         IMPORT_C HBufC *WidenLC(const TDesC8 &aDesC8);
         Description
         
         Converts a string from Code Page 1252 into Unicode.
         
         Parameters
         
         
            
               
                  
                     
                        const TDesC8 &aDesC8 | 
                        
                            The Code Page 1252 string to be converted.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        HBufC * | 
                        
                            Pointer to the string converted into Unicode. The pointer is left on the cleanup stack. The caller takes ownership.  
                         | 
                      
                   
                | 
            
         
          
      
      
         IMPORT_C void CreateConverterL();
         Description
         
         Creates a converter for converting between Unicode and Code Page 1252.
         
         Any unconvertible Unicode characters are converted into question marks. 
          
      
      
         inline CCnvCharacterSetConverter &CharacterSetConverter() const;
         Description
         
         Returns the character set converter created in CreateConverterL().
         
         
         Return value
         
         
          
      
      
         inline TUint ConvertStandardNameL(const TDesC8 &aStandardNameOfCharacterSet);
         Description
         
         Returns the Symbian OS UID for a character set from its Internet-standard name.
         
         Parameters
         
         
            
               
                  
                     
                        const TDesC8 &aStandardNameOfCharacterSet | 
                        
                            Internet-standard name of a character set encoded in 8-bit ASCII.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        
                              TUint
                               | 
                        
                            The Symbian OS UID of the specified character set. If the name is not known, zero is returned.  
                         | 
                      
                   
                | 
            
         
          
      
      
         inline HBufC8 *StandardNameL(TUint aCharSetId);
         Description
         
         Returns the Internet-standard name of a character set, from its Symbian OS UID.
         
         Parameters
         
         
            
               
                  
                     
                        
                              TUint aCharSetId | 
                        
                            The Symbian OS UID of a character set.  
                         | 
                      
                   
                | 
            
         
         
         Return value
         
         
            
               
                  
                     
                        
                              HBufC8 * | 
                        
                            The Internet-standard name or MIME name of the specified character set, or NULL if the UID is not known. The name is encoded
                              in 8-bit ASCII. 
                            
                         | 
                      
                   
                |