revive lost to_utf8
method but move it into '<mapnik/unicode.hpp>'
This commit is contained in:
parent
65da617ec0
commit
f11cc5920f
2 changed files with 12 additions and 0 deletions
|
@ -45,6 +45,10 @@ public:
|
|||
private:
|
||||
UConverter * conv_;
|
||||
};
|
||||
|
||||
// convinience method
|
||||
void to_utf8(mapnik::value_unicode_string const& input, std::string & target);
|
||||
|
||||
}
|
||||
|
||||
#endif // MAPNIK_UNICODE_HPP
|
||||
|
|
|
@ -60,4 +60,12 @@ transcoder::~transcoder()
|
|||
{
|
||||
if (conv_) ucnv_close(conv_);
|
||||
}
|
||||
|
||||
|
||||
void to_utf8(mapnik::value_unicode_string const& input, std::string & target)
|
||||
{
|
||||
target.clear(); // mimic previous target.assign(...) semantics
|
||||
input.toUTF8String(target); // this appends to target
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue