Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | > After this patch I don't think it pays to fiddle a lot more with | > unicode.C. Except moving away from iconv that is. | | And switching to docstring I hope... | | If not, I am asking you for the tenth time: why not?
The interface was supposed to be as lose to an array of elements as possible, to fit iconv and the users we have of it. Why the obsession about moving these simple "wrapper" functions to docstring? Isn't the convenicene functions in docstring enought? Anyhow I plan to add a couple of more functions to unicode so make it "complete": all the conversion variants should have Type const *, size_t ls vector<Type> Type implementations. That should also enable the functions in docstring to drop one of the vectors it is using: example: docstring const from_utf8(std::string const & utf8) { std::vector<boost::uint32_t> const ucs4 = utf8_to_ucs4(std::vector<char>(utf8.begin(), utf8.end())); return docstring(ucs4.begin(), ucs4.end()); } to: docstring const from_utf8(std::string const & utf8) { std::vector<boost::uint32_t> const ucs4 = utf8_to_ucs4(utf8.data(), utf8.size()); return docstring(ucs4.begin(), ucs4.end()); } -- Lgb