Description: Use system utf8
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2016-02-04

Index: ParaView-v5.1.2/VTK/Common/Core/vtkUnicodeString.cxx
===================================================================
--- ParaView-v5.1.2.orig/VTK/Common/Core/vtkUnicodeString.cxx
+++ ParaView-v5.1.2/VTK/Common/Core/vtkUnicodeString.cxx
@@ -41,7 +41,7 @@ vtkUnicodeString::const_iterator::const_
 
 vtkUnicodeString::value_type vtkUnicodeString::const_iterator::operator*() const
 {
-  return vtk_utf8::unchecked::peek_next(this->Position);
+  return utf8::unchecked::peek_next(this->Position);
 }
 
 bool vtkUnicodeString::const_iterator::operator==(const const_iterator& rhs) const
@@ -56,27 +56,27 @@ bool vtkUnicodeString::const_iterator::o
 
 vtkUnicodeString::const_iterator& vtkUnicodeString::const_iterator::operator++()
 {
-  vtk_utf8::unchecked::next(this->Position);
+  utf8::unchecked::next(this->Position);
   return *this;
 }
 
 vtkUnicodeString::const_iterator vtkUnicodeString::const_iterator::operator++(int)
 {
   const_iterator result(this->Position);
-  vtk_utf8::unchecked::next(this->Position);
+  utf8::unchecked::next(this->Position);
   return result;
 }
 
 vtkUnicodeString::const_iterator& vtkUnicodeString::const_iterator::operator--()
 {
-  vtk_utf8::unchecked::prior(this->Position);
+  utf8::unchecked::prior(this->Position);
   return *this;
 }
 
 vtkUnicodeString::const_iterator vtkUnicodeString::const_iterator::operator--(int)
 {
   const_iterator result(this->Position);
-  vtk_utf8::unchecked::prior(this->Position);
+  utf8::unchecked::prior(this->Position);
   return result;
 }
 
@@ -134,7 +134,7 @@ vtkUnicodeString::vtkUnicodeString(const
 vtkUnicodeString::vtkUnicodeString(size_type count, value_type character)
 {
   for(size_type i = 0; i != count; ++i)
-    vtk_utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
+    utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
 }
 
 vtkUnicodeString::vtkUnicodeString(const_iterator first, const_iterator last) :
@@ -149,7 +149,7 @@ bool vtkUnicodeString::is_utf8(const cha
 
 bool vtkUnicodeString::is_utf8(const std::string& value)
 {
-  return vtk_utf8::is_valid(value.begin(), value.end());
+  return utf8::is_valid(value.begin(), value.end());
 }
 
 vtkUnicodeString vtkUnicodeString::from_utf8(const char* value)
@@ -160,7 +160,7 @@ vtkUnicodeString vtkUnicodeString::from_
 vtkUnicodeString vtkUnicodeString::from_utf8(const char* begin, const char* end)
 {
   vtkUnicodeString result;
-  if(vtk_utf8::is_valid(begin, end))
+  if(utf8::is_valid(begin, end))
     {
     result.Storage = std::string(begin, end);
     }
@@ -174,7 +174,7 @@ vtkUnicodeString vtkUnicodeString::from_
 vtkUnicodeString vtkUnicodeString::from_utf8(const std::string& value)
 {
   vtkUnicodeString result;
-  if(vtk_utf8::is_valid(value.begin(), value.end()))
+  if(utf8::is_valid(value.begin(), value.end()))
     {
     result.Storage = value;
     }
@@ -197,9 +197,9 @@ vtkUnicodeString vtkUnicodeString::from_
 
     try
       {
-      vtk_utf8::utf16to8(value, value + length, vtkUnicodeString::back_insert_iterator(result.Storage));
+      utf8::utf16to8(value, value + length, vtkUnicodeString::back_insert_iterator(result.Storage));
       }
-    catch(vtk_utf8::invalid_utf16&)
+    catch(utf8::invalid_utf16&)
       {
       vtkGenericWarningMacro(<< "vtkUnicodeString::from_utf16(): not a valid UTF-16 string.");
       }
@@ -233,15 +233,15 @@ vtkUnicodeString::value_type vtkUnicodeS
     throw std::out_of_range("character out-of-range");
 
   std::string::const_iterator iterator = this->Storage.begin();
-  vtk_utf8::unchecked::advance(iterator, offset);
-  return vtk_utf8::unchecked::peek_next(iterator);
+  utf8::unchecked::advance(iterator, offset);
+  return utf8::unchecked::peek_next(iterator);
 }
 
 vtkUnicodeString::value_type vtkUnicodeString::operator[](size_type offset) const
 {
   std::string::const_iterator iterator = this->Storage.begin();
-  vtk_utf8::unchecked::advance(iterator, offset);
-  return vtk_utf8::unchecked::peek_next(iterator);
+  utf8::unchecked::advance(iterator, offset);
+  return utf8::unchecked::peek_next(iterator);
 }
 
 const char* vtkUnicodeString::utf8_str() const
@@ -257,14 +257,14 @@ void vtkUnicodeString::utf8_str(std::str
 std::vector<vtkTypeUInt16> vtkUnicodeString::utf16_str() const
 {
   std::vector<vtkTypeUInt16> result;
-  vtk_utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
+  utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
   return result;
 }
 
 void vtkUnicodeString::utf16_str(std::vector<vtkTypeUInt16>& result) const
 {
   result.clear();
-  vtk_utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
+  utf8::unchecked::utf8to16(this->Storage.begin(), this->Storage.end(), std::back_inserter(result));
 }
 
 vtkUnicodeString::size_type vtkUnicodeString::byte_count() const
@@ -274,7 +274,7 @@ vtkUnicodeString::size_type vtkUnicodeSt
 
 vtkUnicodeString::size_type vtkUnicodeString::character_count() const
 {
-  return vtk_utf8::unchecked::distance(this->Storage.begin(), this->Storage.end());
+  return utf8::unchecked::distance(this->Storage.begin(), this->Storage.end());
 }
 
 bool vtkUnicodeString::empty() const
@@ -300,9 +300,9 @@ void vtkUnicodeString::push_back(value_t
 {
   try
     {
-    vtk_utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
+    utf8::append(character, vtkUnicodeString::back_insert_iterator(this->Storage));
     }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
     {
     vtkGenericWarningMacro("vtkUnicodeString::push_back(): " << character << "is not a valid Unicode code point");
     }
@@ -319,7 +319,7 @@ void vtkUnicodeString::append(size_type
     {
     this->Storage.append(vtkUnicodeString(count, character).Storage);
     }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
     {
     vtkGenericWarningMacro("vtkUnicodeString::append(): " << character << "is not a valid Unicode code point");
     }
@@ -345,7 +345,7 @@ void vtkUnicodeString::assign(size_type
     {
     this->Storage.assign(vtkUnicodeString(count, character).Storage);
     }
-  catch(vtk_utf8::invalid_code_point&)
+  catch(utf8::invalid_code_point&)
     {
     vtkGenericWarningMacro("vtkUnicodeString::assign(): " << character << "is not a valid Unicode code point");
     }
@@ -415,11 +415,11 @@ vtkUnicodeString vtkUnicodeString::subst
   std::string::const_iterator last = this->Storage.end();
 
   while(from != last && offset--)
-    vtk_utf8::unchecked::advance(from, 1);
+    utf8::unchecked::advance(from, 1);
 
   std::string::const_iterator to = from;
   while(to != last && count--)
-    vtk_utf8::unchecked::advance(to, 1);
+    utf8::unchecked::advance(to, 1);
 
   return vtkUnicodeString(from, to);
 }
Index: ParaView-v5.1.2/VTK/IO/Core/vtkUTF8TextCodec.cxx
===================================================================
--- ParaView-v5.1.2.orig/VTK/IO/Core/vtkUTF8TextCodec.cxx
+++ ParaView-v5.1.2/VTK/IO/Core/vtkUTF8TextCodec.cxx
@@ -124,7 +124,7 @@ vtkUnicodeString::value_type vtkUTF8Text
     throw(std::string("End of Input"));
     }
 
-  getSize = vtk_utf8::internal::sequence_length(c);
+  getSize = utf8::internal::sequence_length(c);
 
   if (0 == getSize)
     throw(std::string("Not enough space"));
@@ -138,7 +138,7 @@ vtkUnicodeString::value_type vtkUTF8Text
 
   istream::char_type* c1 = c;
 
-  const vtkTypeUInt32 code_point = vtk_utf8::next(c1, &c[getSize]);
+  const vtkTypeUInt32 code_point = utf8::next(c1, &c[getSize]);
 
   return code_point;
 }
