---
 src/core/data_only_language.cpp |    2 
 src/core/document.cpp           |   14 +++---
 src/core/emoji.cpp              |   14 +++---
 src/core/english.cpp            |    2 
 src/core/ini_parser.cpp         |    6 +-
 src/core/language.cpp           |   36 ++++++++--------
 src/core/russian.cpp            |    8 +--
 src/core/ukrainian.cpp          |    2 
 src/core/unicode.cpp            |   14 +++---
 src/core/userdict.cpp           |    6 +-
 src/include/core/document.hpp   |    2 
 src/include/core/emoji.hpp      |   10 ++--
 src/include/core/fst.hpp        |    2 
 src/include/core/language.hpp   |   34 +++++++--------
 src/include/core/property.hpp   |   18 ++++----
 src/include/core/str.hpp        |   90 ++++++++++++++++++++--------------------
 src/include/core/unicode.hpp    |    8 +--
 src/include/core/userdict.hpp   |   22 ++++-----
 src/include/core/utf.hpp        |   40 ++++++++---------
 src/include/core/xml.hpp        |   12 ++---
 src/sapi/ISpDataKeyImpl.hpp     |    2 
 src/sapi/text_iterator.hpp      |    6 +-
 22 files changed, 176 insertions(+), 174 deletions(-)

--- a/src/core/unicode.cpp
+++ b/src/core/unicode.cpp
@@ -24,9 +24,9 @@ namespace RHVoice
     {
       struct record
       {
-        utf8::uint32_t code;
+        utf8::utfchar32_t code;
         category_t category;
-        utf8::uint32_t upper,lower;
+        utf8::utfchar32_t upper,lower;
         unsigned int properties;
       };
 
@@ -42,7 +42,7 @@ namespace RHVoice
         return (r1.code<r2.code);
       }
 
-      const record* find(utf8::uint32_t c)
+      const record* find(utf8::utfchar32_t c)
       {
         record r=empty_record;
         r.code=c;
@@ -81,25 +81,25 @@ namespace RHVoice
     extern const category_t category_Zp={'Z','p'};
     extern const category_t category_Zs={'Z','s'};
 
-    category_t category(utf8::uint32_t c)
+    category_t category(utf8::utfchar32_t c)
     {
       const record* r=find(c);
       return (r?(r->category):empty_category);
     }
 
-    utf8::uint32_t toupper(utf8::uint32_t c)
+    utf8::utfchar32_t toupper(utf8::utfchar32_t c)
     {
       const record* r=find(c);
       return (r?(r->upper):c);
     }
 
-    utf8::uint32_t tolower(utf8::uint32_t c)
+    utf8::utfchar32_t tolower(utf8::utfchar32_t c)
     {
       const record* r=find(c);
       return (r?(r->lower):c);
     }
 
-    unsigned int properties(utf8::uint32_t c)
+    unsigned int properties(utf8::utfchar32_t c)
     {
       const record* r=find(c);
       return (r?(r->properties):0);
--- a/src/include/core/unicode.hpp
+++ b/src/include/core/unicode.hpp
@@ -67,10 +67,10 @@ namespace RHVoice
     extern const category_t category_Zp;
     extern const category_t category_Zs;
 
-    category_t category(utf8::uint32_t c);
+    category_t category(utf8::utfchar32_t c);
 
-    utf8::uint32_t toupper(utf8::uint32_t c);
-    utf8::uint32_t tolower(utf8::uint32_t c);
+    utf8::utfchar32_t toupper(utf8::utfchar32_t c);
+    utf8::utfchar32_t tolower(utf8::utfchar32_t c);
 
     enum property_t
       {
@@ -84,7 +84,7 @@ namespace RHVoice
         property_sterm=128
       };
 
-    unsigned int properties(utf8::uint32_t c);
+    unsigned int properties(utf8::utfchar32_t c);
   }
 }
 #endif
--- a/src/core/data_only_language.cpp
+++ b/src/core/data_only_language.cpp
@@ -42,7 +42,7 @@ namespace RHVoice
     io::open_ifstream(gf, path::join(data_path, "graph.txt"));
     std::string gs;
     char t;
-    utf8::uint32_t gc;
+    utf8::utfchar32_t gc;
     while(gf >> gs)
       {
         auto it=gs.cbegin();
--- a/src/core/document.cpp
+++ b/src/core/document.cpp
@@ -41,7 +41,7 @@ namespace RHVoice
     u.get_relation("Event",true).append(parent_token);
     std::string::const_iterator pos=name.begin();
     std::string::const_iterator prev_pos;
-    utf8::uint32_t c;
+    utf8::utfchar32_t c;
     while(pos!=name.end())
       {
         prev_pos=pos;
@@ -82,7 +82,7 @@ namespace RHVoice
         token.set<std::string>("pos","key");
         token.set<verbosity_t>("verbosity",verbosity_name);
         std::string::const_iterator pos=name.begin();
-        utf8::uint32_t cp=utf8::next(pos,name.end());
+        utf8::utfchar32_t cp=utf8::next(pos,name.end());
         if(pos==name.end())
           {
             token.set<std::string>("pos",lang_info.is_letter(cp)?"lseq":"char");
@@ -129,7 +129,7 @@ namespace RHVoice
       return true;
     if(prev_token.type==content_key)
       return false;
-    std::vector<utf8::uint32_t>::const_iterator final_punctuation_start=std::find_if(prev_token.text.rbegin(),prev_token.text.rend(),std::not1(str::is_punct())).base();
+    std::vector<utf8::utfchar32_t>::const_iterator final_punctuation_start=std::find_if(prev_token.text.rbegin(),prev_token.text.rend(),std::not1(str::is_punct())).base();
     if(final_punctuation_start==prev_token.text.end())
       return false;
     if(prev_token.text.back()=='.')
@@ -140,7 +140,7 @@ namespace RHVoice
               return true;
             else
               {
-                std::vector<utf8::uint32_t>::const_iterator last_char_pos=final_punctuation_start-1;
+                std::vector<utf8::utfchar32_t>::const_iterator last_char_pos=final_punctuation_start-1;
                 bool is_alpha=str::isalpha(*last_char_pos);
                 bool is_digit=str::isdigit(*last_char_pos);
                 if(is_alpha || is_digit)
@@ -164,8 +164,8 @@ namespace RHVoice
       }
     else
       {
-        utf8::uint32_t cp;
-        for(std::vector<utf8::uint32_t>::const_iterator it(final_punctuation_start);it!=prev_token.text.end();++it)
+        utf8::utfchar32_t cp;
+        for(std::vector<utf8::utfchar32_t>::const_iterator it(final_punctuation_start);it!=prev_token.text.end();++it)
           {
             cp=*it;
             if((cp=='.')||(cp=='\?')||(cp=='!')||(cp==';')||(cp==':'))
@@ -326,7 +326,7 @@ namespace RHVoice
               {
                 const std::string& pos=token_iter->get("pos").as<std::string>();
                 const std::string& name=token_iter->get("name").as<std::string>();
-                utf8::uint32_t c=utf8::peek_next(name.begin(),name.end());
+                utf8::utfchar32_t c=utf8::peek_next(name.begin(),name.end());
                 if((pos=="sym")&&
                    (((parent->verbosity_settings.punctuation_mode==RHVoice_punctuation_all)&&
                      (str::ispunct(c)||str::issym(c)))||
--- a/src/core/emoji.cpp
+++ b/src/core/emoji.cpp
@@ -24,11 +24,11 @@ namespace RHVoice
 
     const emoji_char_t* end_emoji_char=&emoji_chars[0]+num_emoji_chars;
 
-    const utf8::uint32_t ri_a=0x1f1e6;
-    const utf8::uint32_t ri_z=0x1f1ff;
-    const utf8::uint32_t keycap=0x20e3;
-    const utf8::uint32_t tag_space=0xe0020;
-    const utf8::uint32_t cancel_tag=0xe007f;
+    const utf8::utfchar32_t ri_a=0x1f1e6;
+    const utf8::utfchar32_t ri_z=0x1f1ff;
+    const utf8::utfchar32_t keycap=0x20e3;
+    const utf8::utfchar32_t tag_space=0xe0020;
+    const utf8::utfchar32_t cancel_tag=0xe007f;
 
     inline bool is_regional_indicator(emoji_char_t c)
     {
@@ -247,7 +247,7 @@ namespace RHVoice
 
 }
 
-    emoji_char_t find_emoji_char(utf8::uint32_t c)
+    emoji_char_t find_emoji_char(utf8::utfchar32_t c)
     {
       emoji_char_t tmp={c,0};
       const emoji_char_t* ptr=std::lower_bound(&emoji_chars[0],end_emoji_char,tmp);
@@ -268,7 +268,7 @@ namespace RHVoice
     state.reset(new initial_scanner_state);
 }
 
-  bool emoji_scanner::process(utf8::uint32_t cp)
+  bool emoji_scanner::process(utf8::utfchar32_t cp)
   {
     emoji_char_t c=find_emoji_char(cp);
     if(!c.valid())
--- a/src/core/english.cpp
+++ b/src/core/english.cpp
@@ -111,7 +111,7 @@ namespace RHVoice
   {
     std::vector<std::string> transcription;
     const std::string& name=word.get("name").as<std::string>();
-    std::vector<utf8::uint32_t> chars(str::utf8_string_begin(name),str::utf8_string_end(name));
+    std::vector<utf8::utfchar32_t> chars(str::utf8_string_begin(name),str::utf8_string_end(name));
     if(word.has_feature("lseq"))
       lseq_fst.translate(chars.begin(),chars.end(),std::back_inserter(transcription));
     else
--- a/src/core/ini_parser.cpp
+++ b/src/core/ini_parser.cpp
@@ -83,7 +83,7 @@ namespace RHVoice
     std::string result;
     result.reserve(s.size());
     std::istringstream strm;
-    utf8::uint32_t c;
+    utf8::utfchar32_t c;
     std::string::size_type pos=0;
     std::string::size_type next_pos;
     while((pos!=std::string::npos)&&(pos!=s.size()))
@@ -109,8 +109,10 @@ namespace RHVoice
             else
               strm.setf(std::ios::dec,std::ios::basefield);
             strm.str(s.substr(pos,next_pos-pos));
-            if(!(strm >> c))
+            uint32_t ui;
+            if(!(strm >> ui))
               return std::string();
+            c = ui;
             if(!utf::is_valid(c))
               return std::string();
             utf8::append(c,std::back_inserter(result));
--- a/src/core/language.cpp
+++ b/src/core/language.cpp
@@ -716,12 +716,12 @@ cfg.register_setting(lcfg.tok_sent);
         return parent_token.as("Token");
       }
     const language_info& lang_info=get_info();
-    utf8::uint32_t stress_marker=lang_info.text_settings.stress_marker;
+    utf8::utfchar32_t stress_marker=lang_info.text_settings.stress_marker;
     bool process_stress_marks=lang_info.supports_stress_marks()&&lang_info.text_settings.stress_marker.is_set(true);
-    std::vector<utf8::uint32_t> chars;
+    std::vector<utf8::utfchar32_t> chars;
     std::vector<std::string> syms;
     std::vector<bool> stress_mask;
-    utf8::uint32_t cp;
+    utf8::utfchar32_t cp;
     std::string::const_iterator it(text.begin());
     auto pit=it;
     while(it!=text.end())
@@ -756,8 +756,8 @@ cfg.register_setting(lcfg.tok_sent);
         tokens.pop_back();
       }
     std::string name,pos;
-    std::vector<utf8::uint32_t>::const_iterator token_start=chars.begin();
-    std::vector<utf8::uint32_t>::const_iterator token_end=token_start;
+    std::vector<utf8::utfchar32_t>::const_iterator token_start=chars.begin();
+    std::vector<utf8::utfchar32_t>::const_iterator token_end=token_start;
     stress_pattern stress;
     for(std::vector<std::string>::const_iterator it(tokens.begin());it!=tokens.end();++it)
       {
@@ -788,7 +788,7 @@ cfg.register_setting(lcfg.tok_sent);
     return parent_token.as("Token");
   }
 
-  bool language::translate_emoji(item& parent_token,std::vector<utf8::uint32_t>::const_iterator start,std::vector<utf8::uint32_t>::const_iterator end) const
+  bool language::translate_emoji(item& parent_token,std::vector<utf8::utfchar32_t>::const_iterator start,std::vector<utf8::utfchar32_t>::const_iterator end) const
   {
     std::vector<std::string> annotation;
     if(!emoji_fst->translate(start,end,std::back_inserter(annotation)))
@@ -838,11 +838,11 @@ cfg.register_setting(lcfg.tok_sent);
     return true;
 }
 
-  void language::translate_emoji_element(item& token,std::vector<utf8::uint32_t>::const_iterator start,std::vector<utf8::uint32_t>::const_iterator end) const
+  void language::translate_emoji_element(item& token,std::vector<utf8::utfchar32_t>::const_iterator start,std::vector<utf8::utfchar32_t>::const_iterator end) const
   {
     if(translate_emoji(token,start,end))
       return;
-    std::vector<utf8::uint32_t>::const_iterator second=start+1;
+    std::vector<utf8::utfchar32_t>::const_iterator second=start+1;
     if(second==end)
       return;
     emoji_char_t c=find_emoji_char(*second);
@@ -855,10 +855,10 @@ cfg.register_setting(lcfg.tok_sent);
       translate_emoji(token,second,second+1);
 }
 
-  std::vector<utf8::uint32_t> language::remove_emoji_presentation_selectors(const std::string& text) const
+  std::vector<utf8::utfchar32_t> language::remove_emoji_presentation_selectors(const std::string& text) const
   {
-    std::vector<utf8::uint32_t> seq;
-    utf8::uint32_t cp;
+    std::vector<utf8::utfchar32_t> seq;
+    utf8::utfchar32_t cp;
     std::string::const_iterator it(text.begin());
     while(it!=text.end())
       {
@@ -871,8 +871,8 @@ cfg.register_setting(lcfg.tok_sent);
 
   void language::translate_emoji_sequence(item& token,const std::string& text) const
   {
-    const std::vector<utf8::uint32_t> seq(remove_emoji_presentation_selectors(text));
-    std::vector<utf8::uint32_t>::const_iterator end=std::find(seq.begin(),seq.end(),zwj);
+    const std::vector<utf8::utfchar32_t> seq(remove_emoji_presentation_selectors(text));
+    std::vector<utf8::utfchar32_t>::const_iterator end=std::find(seq.begin(),seq.end(),zwj);
     if(end==seq.end())
       {
         translate_emoji_element(token,seq.begin(),seq.end());
@@ -880,7 +880,7 @@ cfg.register_setting(lcfg.tok_sent);
 }
     if(translate_emoji(token,seq.begin(),seq.end()))
       return;
-    std::vector<utf8::uint32_t>::const_iterator start=seq.begin();
+    std::vector<utf8::utfchar32_t>::const_iterator start=seq.begin();
     translate_emoji_element(token,start,end);
     while(end!=seq.end())
       {
@@ -1029,7 +1029,7 @@ else
   {
     str::utf8_string_iterator start=str::utf8_string_begin(token_name);
     str::utf8_string_iterator end=str::utf8_string_end(token_name);
-    utf8::uint32_t cp;
+    utf8::utfchar32_t cp;
     for(str::utf8_string_iterator it=start;it!=end;++it)
       {
         cp=*it;
@@ -1040,8 +1040,8 @@ else
   bool language::decode_as_known_character(item& token,const std::string& token_name) const
   {
     std::vector<std::string> input;
-    utf8::uint32_t c=utf8::peek_next(token_name.begin(),token_name.end());
-    std::map<utf8::uint32_t,std::string>::const_iterator it=whitespace_symbols.find(c);
+    utf8::utfchar32_t c=utf8::peek_next(token_name.begin(),token_name.end());
+    std::map<utf8::utfchar32_t,std::string>::const_iterator it=whitespace_symbols.find(c);
     input.push_back((it==whitespace_symbols.end())?token_name:(it->second));
     return spell_fst.translate(input.begin(),input.end(),token.back_inserter());
   }
@@ -1073,7 +1073,7 @@ else
       return;
     const std::string& token_name=token.get("name").as<std::string>();
     std::string::const_iterator it=token_name.begin();
-    utf8::uint32_t c=utf8::next(it,token_name.end());
+    utf8::utfchar32_t c=utf8::next(it,token_name.end());
     if(!((it==token_name.end())&&str::isupper(c)))
       return;
     bool prefix=true;
--- a/src/core/russian.cpp
+++ b/src/core/russian.cpp
@@ -37,7 +37,7 @@ namespace RHVoice
     };
 
 
-    utf8::uint32_t russian_vowel_letters[20]={1025,1040,1045,1048,1054,1059,1067,1069,1070,1071,1072,1077,1080,1086,1091,1099,1101,1102,1103,1105};
+    utf8::utfchar32_t russian_vowel_letters[20]={1025,1040,1045,1048,1054,1059,1067,1069,1070,1071,1072,1077,1080,1086,1091,1099,1101,1102,1103,1105};
   }
 
   russian_info::russian_info(const std::string& data_path,const std::string& userdict_path):
@@ -238,8 +238,8 @@ namespace RHVoice
     ++next_pos;
     if(std::find_if(next_pos,end,is_vowel_letter(info))!=end)
       return false;
-    std::vector<utf8::uint32_t> letters(start,first_vowel_pos);
-    utf8::uint32_t cp=*first_vowel_pos;
+    std::vector<utf8::utfchar32_t> letters(start,first_vowel_pos);
+    utf8::utfchar32_t cp=*first_vowel_pos;
     letters.push_back((cp==1105)?cp:str::toupper(cp));
     letters.insert(letters.end(),next_pos,end);
     g2p_fst.translate(letters.begin(),letters.end(),std::back_inserter(transcription));
@@ -262,7 +262,7 @@ namespace RHVoice
   bool russian::transcribe_word_applying_stress_rules(const item& word,std::vector<std::string>& transcription) const
   {
     const std::string& name=word.get("name").as<std::string>();
-    std::vector<utf8::uint32_t> letters;
+    std::vector<utf8::utfchar32_t> letters;
     letters.push_back('#');
     letters.insert(letters.end(),str::utf8_string_begin(name),str::utf8_string_end(name));
     letters.push_back('#');
--- a/src/core/ukrainian.cpp
+++ b/src/core/ukrainian.cpp
@@ -100,7 +100,7 @@ namespace RHVoice
         g2p_fst.translate(stressed.begin(),stressed.end(),std::back_inserter(transcription));
         return transcription;
       }
-    std::vector<utf8::uint32_t> letters;
+    std::vector<utf8::utfchar32_t> letters;
     letters.push_back('#');
     letters.insert(letters.end(),str::utf8_string_begin(name),str::utf8_string_end(name));
     letters.push_back('#');
--- a/src/core/userdict.cpp
+++ b/src/core/userdict.cpp
@@ -159,7 +159,7 @@ namespace RHVoice
         lexer(const lexer&);
         lexer& operator=(const lexer&);
 
-        bool match_reserved_symbol(utf8::uint32_t chr,int type)
+        bool match_reserved_symbol(utf8::utfchar32_t chr,int type)
         {
           if(*pos==chr)
             {
@@ -300,7 +300,7 @@ namespace RHVoice
         bool match_symbol()
         {
           chars32::const_iterator end=pos+1;
-          utf8::uint32_t sym=*pos;
+          utf8::utfchar32_t sym=*pos;
           if(sym=='#')
             {
               chars32::const_iterator start=pos+1;
@@ -315,7 +315,7 @@ namespace RHVoice
                       std::string s;
                       utf8::utf32to8(start,end,std::back_inserter(s));
                       std::istringstream strm(s);
-                      utf8::uint32_t c;
+                      uint32_t c;
                       if(strm>>c)
                         if(utf::is_valid(c))
                           sym=c;
--- a/src/include/core/document.hpp
+++ b/src/include/core/document.hpp
@@ -45,7 +45,7 @@ namespace RHVoice
   struct text_token
   {
     content_type type;
-    std::vector<utf8::uint32_t> text,whitespace;
+    std::vector<utf8::utfchar32_t> text,whitespace;
     std::size_t position,length;
 
     text_token():
--- a/src/include/core/emoji.hpp
+++ b/src/include/core/emoji.hpp
@@ -33,7 +33,7 @@ emoji_property_extended_pictographic=32
 
   struct emoji_char_t
   {
-    utf8::uint32_t cp;
+    utf8::utfchar32_t cp;
     unsigned int p;
 
     bool valid()
@@ -47,10 +47,10 @@ emoji_property_extended_pictographic=32
 }
   };
 
-  emoji_char_t find_emoji_char(utf8::uint32_t c);
+  emoji_char_t find_emoji_char(utf8::utfchar32_t c);
 
-  const utf8::uint32_t emoji_presentation_selector=0xfe0f;
-  const utf8::uint32_t zwj=0x200d;
+  const utf8::utfchar32_t emoji_presentation_selector=0xfe0f;
+  const utf8::utfchar32_t zwj=0x200d;
 
   class emoji_scanner_state
   {
@@ -94,7 +94,7 @@ emoji_property_extended_pictographic=32
       return (length==0);
 }
 
-    bool process(utf8::uint32_t c);
+    bool process(utf8::utfchar32_t c);
 
   private:
     std::unique_ptr<emoji_scanner_state> state;
--- a/src/include/core/fst.hpp
+++ b/src/include/core/fst.hpp
@@ -171,7 +171,7 @@ namespace RHVoice
       dest.push_back(input_symbols::value_type(name,symbols.id(name,1)));
     }
 
-    void append_input_symbol(utf8::uint32_t chr,input_symbols& dest) const
+    void append_input_symbol(utf8::utfchar32_t chr,input_symbols& dest) const
     {
       std::string name;
       utf8::append(chr,std::back_inserter(name));
--- a/src/include/core/language.hpp
+++ b/src/include/core/language.hpp
@@ -305,9 +305,9 @@ namespace RHVoice
 
     bool check_for_f123(const item& tok,const std::string& name) const;
 
-    bool translate_emoji(item& token,std::vector<utf8::uint32_t>::const_iterator start,std::vector<utf8::uint32_t>::const_iterator end) const;
-    std::vector<utf8::uint32_t> remove_emoji_presentation_selectors(const std::string& text) const;
-    void translate_emoji_element(item& token,std::vector<utf8::uint32_t>::const_iterator start,std::vector<utf8::uint32_t>::const_iterator end) const;
+    bool translate_emoji(item& token,std::vector<utf8::utfchar32_t>::const_iterator start,std::vector<utf8::utfchar32_t>::const_iterator end) const;
+    std::vector<utf8::utfchar32_t> remove_emoji_presentation_selectors(const std::string& text) const;
+    void translate_emoji_element(item& token,std::vector<utf8::utfchar32_t>::const_iterator start,std::vector<utf8::utfchar32_t>::const_iterator end) const;
     void translate_emoji_sequence(item& token,const std::string& text) const;
     void set_user_phones(item& word) const;
     item& append_subtoken(item& parent_token, const std::string& name, const std::string& pos) const;
@@ -322,7 +322,7 @@ namespace RHVoice
     const dtree phrasing_dtree;
     const fst syl_fst;
     std::vector<std::string> msg_cap_letter,msg_char_code;
-    std::map<utf8::uint32_t,std::string> whitespace_symbols;
+    std::map<utf8::utfchar32_t,std::string> whitespace_symbols;
     std::unique_ptr<fst> english_phone_mapping_fst;
     std::unique_ptr<fst> emoji_fst;
 std::unique_ptr<fst> qst_fst;
@@ -375,19 +375,19 @@ std::unique_ptr<fst> qst_fst;
       return enabled;
     }
 
-    bool is_letter(utf8::uint32_t cp) const
+    bool is_letter(utf8::utfchar32_t cp) const
     {
       return (letters.find(cp)!=letters.end());
     }
 
-    bool is_sign(utf8::uint32_t cp) const
+    bool is_sign(utf8::utfchar32_t cp) const
     {
       return (signs.find(cp)!=signs.end());
     }
 
     bool has_common_letters(const language_info& other) const
     {
-      for(std::set<utf8::uint32_t>::const_iterator iter=letters.begin();iter!=letters.end();++iter)
+      for(std::set<utf8::utfchar32_t>::const_iterator iter=letters.begin();iter!=letters.end();++iter)
         {
           if(other.is_letter(*iter))
             return true;
@@ -420,7 +420,7 @@ std::unique_ptr<fst> qst_fst;
       return true;
     }
 
-    bool is_vowel_letter(utf8::uint32_t cp) const
+    bool is_vowel_letter(utf8::utfchar32_t cp) const
     {
       return (vowel_letters.find(cp)!=vowel_letters.end());
     }
@@ -464,16 +464,16 @@ std::unique_ptr<fst> qst_fst;
 
   private:
     std::string alpha2_code,alpha3_code;
-    std::set<utf8::uint32_t> letters,vowel_letters,signs;
+    std::set<utf8::utfchar32_t> letters,vowel_letters,signs;
     bool_property enabled;
 
   protected:
-    void register_letter(utf8::uint32_t cp)
+    void register_letter(utf8::utfchar32_t cp)
     {
       letters.insert(cp);
     }
 
-    void register_letter_range(utf8::uint32_t cp,std::size_t n)
+    void register_letter_range(utf8::utfchar32_t cp,std::size_t n)
     {
       for(std::size_t i=0;i<n;++i)
         {
@@ -481,12 +481,12 @@ std::unique_ptr<fst> qst_fst;
         }
     }
 
-    void register_vowel_letter(utf8::uint32_t cp)
+    void register_vowel_letter(utf8::utfchar32_t cp)
     {
       vowel_letters.insert(cp);
     }
 
-    void register_sign(utf8::uint32_t cp)
+    void register_sign(utf8::utfchar32_t cp)
     {
       signs.insert(cp);
     }
@@ -584,14 +584,14 @@ std::unique_ptr<fst> qst_fst;
     std::string name,code;
   };
 
-  struct is_letter: std::unary_function<utf8::uint32_t,bool>
+  struct is_letter: std::unary_function<utf8::utfchar32_t,bool>
   {
     explicit is_letter(const language_info& lang_):
       lang(&lang_)
     {
     }
 
-    bool operator()(utf8::uint32_t cp) const
+    bool operator()(utf8::utfchar32_t cp) const
     {
       return lang->is_letter(cp);
     }
@@ -600,14 +600,14 @@ std::unique_ptr<fst> qst_fst;
     const language_info* lang;
   };
 
-  struct is_vowel_letter: std::unary_function<utf8::uint32_t,bool>
+  struct is_vowel_letter: std::unary_function<utf8::utfchar32_t,bool>
   {
     explicit is_vowel_letter(const language_info& lang_):
       lang(&lang_)
     {
     }
 
-    bool operator()(utf8::uint32_t cp) const
+    bool operator()(utf8::utfchar32_t cp) const
     {
       return lang->is_vowel_letter(cp);
     }
--- a/src/include/core/property.hpp
+++ b/src/include/core/property.hpp
@@ -188,29 +188,29 @@ namespace RHVoice
     T min_value,max_value;
   };
 
-  class char_property: public property<utf8::uint32_t>
+  class char_property: public property<utf8::utfchar32_t>
   {
   public:
-    char_property(const std::string& name,utf8::uint32_t default_val):
-      property<utf8::uint32_t>(name,default_val)
+    char_property(const std::string& name,utf8::utfchar32_t default_val):
+      property<utf8::utfchar32_t>(name,default_val)
     {
     }
 
     bool set_from_string(const std::string& s)
     {
       std::string::const_iterator pos=s.begin();
-      utf8::uint32_t cp=utf8::next(pos,s.end());
+      utf8::utfchar32_t cp=utf8::next(pos,s.end());
       return ((pos==s.end())&&this->set_value(cp));
     }
 
-    char_property& operator=(utf8::uint32_t val)
+    char_property& operator=(utf8::utfchar32_t val)
     {
       this->set_value(val);
       return *this;
     }
 
   private:
-    bool check_value(const utf8::uint32_t& given_value,utf8::uint32_t& correct_value) const
+    bool check_value(const utf8::utfchar32_t& given_value,utf8::utfchar32_t& correct_value) const
     {
       if(utf::is_valid(given_value))
         {
@@ -343,10 +343,10 @@ namespace RHVoice
     }
   };
 
-  class charset_property: public property<std::set<utf8::uint32_t> >
+  class charset_property: public property<std::set<utf8::utfchar32_t> >
   {
   private:
-    typedef std::set<utf8::uint32_t> charset;
+    typedef std::set<utf8::utfchar32_t> charset;
 
   public:
     charset_property(const std::string& name,const std::string& chars):
@@ -360,7 +360,7 @@ namespace RHVoice
       return this->set_value(val);
     }
 
-    bool includes(utf8::uint32_t c) const
+    bool includes(utf8::utfchar32_t c) const
     {
       const charset& val=get_value();
       return (val.find(c)!=val.end());
--- a/src/include/core/str.hpp
+++ b/src/include/core/str.hpp
@@ -70,7 +70,7 @@ namespace RHVoice
         return *this;
       }
 
-      utf8_insert_iterator& operator=(utf8::uint32_t c)
+      utf8_insert_iterator& operator=(utf8::utfchar32_t c)
       {
         utf8::append(c,pos);
         return *this;
@@ -160,168 +160,168 @@ namespace RHVoice
       return (s1.size()<s2.size())?false:(s1.substr(s1.size()-s2.size(),s2.size())==s2);
     }
 
-    inline bool isspace(utf8::uint32_t c)
+    inline bool isspace(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_white_space);
     }
 
-    inline bool isupper(utf8::uint32_t c)
+    inline bool isupper(utf8::utfchar32_t c)
     {
       return ((unicode::properties(c)&unicode::property_uppercase)||(unicode::category(c)==unicode::category_Lt));
     }
 
-    inline bool islower(utf8::uint32_t c)
+    inline bool islower(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_lowercase);
     }
 
-    inline bool isalpha(utf8::uint32_t c)
+    inline bool isalpha(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_alphabetic);
     }
 
-    inline bool isquote(utf8::uint32_t c)
+    inline bool isquote(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_quotation_mark);
     }
 
-    inline bool isdash(utf8::uint32_t c)
+    inline bool isdash(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_dash);
     }
 
-    inline bool ispunct(utf8::uint32_t c)
+    inline bool ispunct(utf8::utfchar32_t c)
     {
       return (unicode::category(c).major_class=='P');
     }
 
-    inline bool istermpunct(utf8::uint32_t c)
+    inline bool istermpunct(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_terminal_punctuation);
     }
 
-    inline bool issterm(utf8::uint32_t c)
+    inline bool issterm(utf8::utfchar32_t c)
     {
       return (unicode::properties(c)&unicode::property_sterm);
     }
 
-    inline bool isdigit(utf8::uint32_t c)
+    inline bool isdigit(utf8::utfchar32_t c)
     {
       return (unicode::category(c)==unicode::category_Nd);
     }
 
-    inline bool isadigit(utf8::uint32_t c)
+    inline bool isadigit(utf8::utfchar32_t c)
     {
       return ((c>='0')&&(c<='9'));
     }
 
-    inline bool issym(utf8::uint32_t c)
+    inline bool issym(utf8::utfchar32_t c)
     {
       return (unicode::category(c).major_class=='S');
     }
 
-    struct is_space: public std::unary_function<utf8::uint32_t,bool>
+    struct is_space: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isspace(c);
       }
     };
 
-    struct is_upper: public std::unary_function<utf8::uint32_t,bool>
+    struct is_upper: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isupper(c);
       }
     };
 
-    struct is_lower: public std::unary_function<utf8::uint32_t,bool>
+    struct is_lower: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return islower(c);
       }
     };
 
-    struct is_alpha: public std::unary_function<utf8::uint32_t,bool>
+    struct is_alpha: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isalpha(c);
       }
     };
 
-    struct is_quote: public std::unary_function<utf8::uint32_t,bool>
+    struct is_quote: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isquote(c);
       }
     };
 
-    struct is_dash: public std::unary_function<utf8::uint32_t,bool>
+    struct is_dash: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isdash(c);
       }
     };
 
-    struct is_punct: public std::unary_function<utf8::uint32_t,bool>
+    struct is_punct: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return ispunct(c);
       }
     };
 
-    struct is_termpunct: public std::unary_function<utf8::uint32_t,bool>
+    struct is_termpunct: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return istermpunct(c);
       }
     };
 
-    struct is_sterm: public std::unary_function<utf8::uint32_t,bool>
+    struct is_sterm: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return issterm(c);
       }
     };
 
-    struct is_digit: public std::unary_function<utf8::uint32_t,bool>
+    struct is_digit: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isdigit(c);
       }
     };
 
-    struct is_adigit: public std::unary_function<utf8::uint32_t,bool>
+    struct is_adigit: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return isadigit(c);
       }
     };
 
-    struct is_equal_to: public std::unary_function<utf8::uint32_t,bool>
+    struct is_equal_to: public std::unary_function<utf8::utfchar32_t,bool>
     {
-      explicit is_equal_to(utf8::uint32_t c):
+      explicit is_equal_to(utf8::utfchar32_t c):
       chr(c)
       {
       }
 
-      bool operator()(utf8::uint32_t c) const
+      bool operator()(utf8::utfchar32_t c) const
       {
         return (c==chr);
       }
 
     private:
-      utf8::uint32_t chr;
+      utf8::utfchar32_t chr;
     };
 
     inline std::string trim(const std::string& s)
@@ -366,7 +366,7 @@ namespace RHVoice
       {
         std::string::const_iterator pos1=s1.begin();
         std::string::const_iterator pos2=s2.begin();
-        utf8::uint32_t cp1,cp2;
+        utf8::utfchar32_t cp1,cp2;
         while((pos1!=s1.end())&&(pos2!=s2.end()))
           {
             cp1=tolower(utf8::next(pos1,s1.end()));
@@ -463,8 +463,8 @@ namespace RHVoice
 
     template<typename input_iterator> std::size_t count_newlines(input_iterator start,input_iterator end)
     {
-      utf8::uint32_t chr;
-      utf8::uint32_t prev_chr=0;
+      utf8::utfchar32_t chr;
+      utf8::utfchar32_t prev_chr=0;
       std::size_t n=0;
       for(input_iterator it=start;it!=end;++it)
         {
@@ -478,7 +478,7 @@ namespace RHVoice
 
     struct to_lower
     {
-      utf8::uint32_t operator()(utf8::uint32_t c) const
+      utf8::utfchar32_t operator()(utf8::utfchar32_t c) const
       {
         return tolower(c);
       }
@@ -521,7 +521,7 @@ namespace RHVoice
       return (it==utf8_string_end(s));
     }
 
-    inline std::string cp2str(utf8::uint32_t cp)
+    inline std::string cp2str(utf8::utfchar32_t cp)
     {
       std::string s;
       utf8::append(cp, std::back_inserter(s));
@@ -531,7 +531,7 @@ namespace RHVoice
     template<typename oit>
     oit utf8explode(const std::string& s, oit out)
     {
-      return std::transform(utf8_string_begin(s), utf8_string_end(s), out, [] (utf8::uint32_t cp)-> std::string {return cp2str(cp);});
+      return std::transform(utf8_string_begin(s), utf8_string_end(s), out, [] (utf8::utfchar32_t cp)-> std::string {return cp2str(cp);});
     }
   }
 }
--- a/src/include/core/userdict.hpp
+++ b/src/include/core/userdict.hpp
@@ -36,7 +36,7 @@ namespace RHVoice
 
   namespace userdict
   {
-    typedef std::vector<utf8::uint32_t> chars32;
+    typedef std::vector<utf8::utfchar32_t> chars32;
 
     enum
       {
@@ -44,7 +44,7 @@ namespace RHVoice
         token_end
       };
 
-    class position: public std::iterator<std::forward_iterator_tag,utf8::uint32_t>
+    class position: public std::iterator<std::forward_iterator_tag,utf8::utfchar32_t>
     {
     public:
       position():
@@ -61,7 +61,7 @@ namespace RHVoice
 
       explicit position(utterance& utt);
 
-      utf8::uint32_t operator*() const
+      utf8::utfchar32_t operator*() const
       {
         return character;
       }
@@ -141,7 +141,7 @@ namespace RHVoice
       item* token;
       const std::string* text;
       std::string::const_iterator pos;
-      utf8::uint32_t character;
+      utf8::utfchar32_t character;
     };
 
     class word_editor
@@ -167,14 +167,14 @@ namespace RHVoice
 
       void delete_char()
       {
-        utf8::uint32_t c=*cursor;
+        utf8::utfchar32_t c=*cursor;
         if(c>=token_start)
           throw std::logic_error("Nothing to delete");
         ++cursor;
         changed=true;
       }
 
-      void insert_char(utf8::uint32_t c)
+      void insert_char(utf8::utfchar32_t c)
       {
         text.push_back(c);
         changed=true;
@@ -182,7 +182,7 @@ namespace RHVoice
 
       void forward_char()
       {
-        utf8::uint32_t c=*cursor;
+        utf8::utfchar32_t c=*cursor;
         switch(c)
           {
           case token_start:
@@ -256,7 +256,7 @@ namespace RHVoice
       {
       }
 
-      void append(utf8::uint32_t c)
+      void append(utf8::utfchar32_t c)
       {
         text.push_back(c);
       }
@@ -392,7 +392,7 @@ namespace RHVoice
       }
 
       private:
-            utf8::uint32_t chr;
+            utf8::utfchar32_t chr;
     };
 
     class deletion: public substring
@@ -773,7 +773,7 @@ namespace RHVoice
 
     struct to_lower
     {
-      utf8::uint32_t operator()(utf8::uint32_t c) const
+      utf8::utfchar32_t operator()(utf8::utfchar32_t c) const
       {
         if(c>=token_start)
           return c;
@@ -788,7 +788,7 @@ namespace RHVoice
     bool should_ignore_token(const position& pos) const;
 
     const language_info& lang;
-    trie<utf8::uint32_t,rule,to_lower> rules;
+    trie<utf8::utfchar32_t,rule,to_lower> rules;
   };
   }
 }
--- a/src/include/core/utf.hpp
+++ b/src/include/core/utf.hpp
@@ -23,7 +23,7 @@ namespace RHVoice
 {
   namespace utf
   {
-    inline bool is_valid(utf8::uint32_t cp)
+    inline bool is_valid(utf8::utfchar32_t cp)
     {
       return ((cp<=0x10ffff)&&((cp<=0xd7ff)||(cp>=0xe000)));
     }
@@ -34,7 +34,7 @@ namespace RHVoice
     template<>
     struct next_impl<1>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator end) const
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator end) const
       {
         return utf8::next(it,end);
       }
@@ -43,9 +43,9 @@ namespace RHVoice
     template<>
     struct next_impl<4>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator end) const
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator end) const
       {
-        utf8::uint32_t cp=*it;
+        utf8::utfchar32_t cp=*it;
         if(!is_valid(cp))
           throw utf8::invalid_code_point(cp);
         ++it;
@@ -56,12 +56,12 @@ namespace RHVoice
     template<>
     struct next_impl<2>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator end) const;
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator end) const;
     };
 
-    template<typename iterator> utf8::uint32_t next_impl<2>::operator()(iterator& it,iterator end) const
+    template<typename iterator> utf8::utfchar32_t next_impl<2>::operator()(iterator& it,iterator end) const
     {
-      utf8::uint32_t c1=*it;
+      utf8::utfchar32_t c1=*it;
       if((c1<0xd800)||(c1>0xdfff))
         {
           ++it;
@@ -75,7 +75,7 @@ namespace RHVoice
               ++tmp;
               if(tmp!=end)
                 {
-                  utf8::uint32_t c2=*tmp;
+                  utf8::utfchar32_t c2=*tmp;
                   if((c2>0xdbff)&&(c2<0xe000))
                     {
                       std::advance(it,2);
@@ -92,7 +92,7 @@ namespace RHVoice
         }
     }
 
-    template<typename iterator> inline utf8::uint32_t next(iterator& it,iterator end)
+    template<typename iterator> inline utf8::utfchar32_t next(iterator& it,iterator end)
     {
       if(it==end)
         throw utf8::not_enough_room();
@@ -109,7 +109,7 @@ namespace RHVoice
     template<>
     struct prev_impl<1>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator start) const
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator start) const
       {
         return utf8::prior(it,start);
       }
@@ -118,11 +118,11 @@ namespace RHVoice
     template<>
     struct prev_impl<4>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator start) const
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator start) const
       {
         iterator tmp=it;
         --tmp;
-        utf8::uint32_t cp=*tmp;
+        utf8::utfchar32_t cp=*tmp;
         if((cp>0x10ffff)||((cp>0xd7ff)&&(cp<0xe000)))
           throw utf8::invalid_code_point(cp);
         it=tmp;
@@ -133,14 +133,14 @@ namespace RHVoice
     template<>
     struct prev_impl<2>
     {
-      template<typename iterator> utf8::uint32_t operator()(iterator& it,iterator start) const;
+      template<typename iterator> utf8::utfchar32_t operator()(iterator& it,iterator start) const;
     };
 
-    template<typename iterator> utf8::uint32_t prev_impl<2>::operator()(iterator& it,iterator start) const
+    template<typename iterator> utf8::utfchar32_t prev_impl<2>::operator()(iterator& it,iterator start) const
     {
       iterator tmp=it;
       --tmp;
-      utf8::uint32_t c2=*tmp;
+      utf8::utfchar32_t c2=*tmp;
       if((c2<0xd800)||(c2>0xdfff))
         {
           it=tmp;
@@ -155,7 +155,7 @@ namespace RHVoice
               else
                 {
                   --tmp;
-                  utf8::uint32_t c1=*tmp;
+                  utf8::utfchar32_t c1=*tmp;
                   if((c1>0xd7ff)&&(c1<0xdc00))
                     {
                       it=tmp;
@@ -169,7 +169,7 @@ namespace RHVoice
         }
     }
 
-    template<typename iterator> inline utf8::uint32_t prev(iterator& it,iterator start)
+    template<typename iterator> inline utf8::utfchar32_t prev(iterator& it,iterator start)
     {
       if(it==start)
         throw utf8::not_enough_room();
@@ -181,7 +181,7 @@ namespace RHVoice
     }
 
     template<typename forward_iterator>
-    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::uint32_t>
+    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::utfchar32_t>
     {
     public:
       text_iterator():
@@ -199,7 +199,7 @@ namespace RHVoice
         ++(*this);
       }
 
-      const utf8::uint32_t& operator*() const
+      const utf8::utfchar32_t& operator*() const
       {
         return code_point;
       }
@@ -246,7 +246,7 @@ namespace RHVoice
       }
 
     private:
-      utf8::uint32_t code_point;
+      utf8::utfchar32_t code_point;
       forward_iterator start,end,range_start,range_end;
     };
   }
--- a/src/include/core/xml.hpp
+++ b/src/include/core/xml.hpp
@@ -35,7 +35,7 @@ namespace RHVoice
   namespace xml
   {
     template<typename forward_iterator>
-    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::uint32_t>
+    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::utfchar32_t>
     {
     public:
       text_iterator():
@@ -53,7 +53,7 @@ namespace RHVoice
         ++(*this);
       }
 
-      const utf8::uint32_t& operator*() const
+      const utf8::utfchar32_t& operator*() const
       {
         return code_point;
       }
@@ -89,9 +89,9 @@ namespace RHVoice
 
     private:
       typedef typename std::iterator_traits<forward_iterator>::value_type char_type;
-      bool translate(const std::basic_string<char_type>& s,utf8::uint32_t& r);
+      bool translate(const std::basic_string<char_type>& s,utf8::utfchar32_t& r);
 
-      utf8::uint32_t code_point;
+      utf8::utfchar32_t code_point;
       forward_iterator start,end,range_start,range_end;
     };
 
@@ -126,11 +126,11 @@ namespace RHVoice
     }
 
     template<typename forward_iterator>
-    bool text_iterator<forward_iterator>::translate(const std::basic_string<char_type>& s,utf8::uint32_t& r)
+    bool text_iterator<forward_iterator>::translate(const std::basic_string<char_type>& s,utf8::utfchar32_t& r)
     {
       if(s.size()>1)
         {
-          utf8::uint32_t cp;
+          uint32_t cp;
           std::basic_istringstream<char_type> in;
           switch(s[0])
             {
--- a/src/sapi/ISpDataKeyImpl.hpp
+++ b/src/sapi/ISpDataKeyImpl.hpp
@@ -55,7 +55,7 @@ namespace RHVoice
         {
           std::wstring::const_iterator pos1=s1.begin();
           std::wstring::const_iterator pos2=s2.begin();
-          utf8::uint32_t cp1,cp2;
+          utf8::utfchar32_t cp1,cp2;
           while((pos1!=s1.end())&&(pos2!=s2.end()))
             {
               cp1=str::tolower(utf::next(pos1,s1.end()));
--- a/src/sapi/text_iterator.hpp
+++ b/src/sapi/text_iterator.hpp
@@ -26,7 +26,7 @@ namespace RHVoice
 {
   namespace sapi
   {
-    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::uint32_t>
+    class text_iterator: public std::iterator<std::forward_iterator_tag,const utf8::utfchar32_t>
     {
     public:
       text_iterator():
@@ -48,7 +48,7 @@ namespace RHVoice
         ++(*this);
       }
 
-      const utf8::uint32_t& operator*() const
+      const utf8::utfchar32_t& operator*() const
       {
         return code_point;
       }
@@ -92,7 +92,7 @@ namespace RHVoice
     private:
       const SPVTEXTFRAG* text_frag;
       const wchar_t *range_end,*start,*end;
-      utf8::uint32_t code_point;
+      utf8::utfchar32_t code_point;
     };
   }
 }
