Home | History | Annotate | Download | only in answers
      1 /********************************************************************
      2  * COPYRIGHT:
      3  * Copyright (c) 1999-2002, International Business Machines Corporation and
      4  * others. All Rights Reserved.
      5  ********************************************************************/
      6 
      7 #include "unicode/translit.h"
      8 #include "unicode/normlzr.h"
      9 
     10 class UnaccentTransliterator : public Transliterator {
     11 
     12  public:
     13 
     14     /**
     15      * Constructor
     16      */
     17     UnaccentTransliterator();
     18 
     19     /**
     20      * Destructor
     21      */
     22     virtual ~UnaccentTransliterator();
     23 
     24  protected:
     25 
     26     /**
     27      * Implement Transliterator API
     28      */
     29     virtual void handleTransliterate(Replaceable& text,
     30                                      UTransPosition& index,
     31                                      UBool incremental) const;
     32 
     33  private:
     34 
     35     /**
     36      * Unaccent a single character using normalizer.
     37      */
     38     UChar unaccent(UChar c) const;
     39 
     40     Normalizer normalizer;
     41 };
     42