mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 22:03:04 +01:00
42 lines
929 B
C++
42 lines
929 B
C++
/********************************************************************
|
|
* COPYRIGHT:
|
|
* Copyright (c) 1999-2002, International Business Machines Corporation and
|
|
* others. All Rights Reserved.
|
|
********************************************************************/
|
|
|
|
#include "unicode/translit.h"
|
|
#include "unicode/normlzr.h"
|
|
|
|
class UnaccentTransliterator : public Transliterator {
|
|
|
|
public:
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
UnaccentTransliterator();
|
|
|
|
/**
|
|
* Destructor
|
|
*/
|
|
virtual ~UnaccentTransliterator();
|
|
|
|
protected:
|
|
|
|
/**
|
|
* Implement Transliterator API
|
|
*/
|
|
virtual void handleTransliterate(Replaceable& text,
|
|
UTransPosition& index,
|
|
UBool incremental) const;
|
|
|
|
private:
|
|
|
|
/**
|
|
* Unaccent a single character using normalizer.
|
|
*/
|
|
UChar unaccent(UChar c) const;
|
|
|
|
Normalizer normalizer;
|
|
};
|