Abdelrazak Younes wrote:
Here comes the next bit: I discovered that the result of
std::vector<char> ucs4_to_utf8(boost::uint32_t c)
was never used as a vector. I changed it to std::string, and that
simplifies
the code. In particular it removes manual fiddling with the terminating
'\0', which we should not do IMHO.
Having had a closer look at "unicode.C" it seems that all use of
std::vector could be replaced by std::basic_string. We just have to
replace "push_back" with "+="...
There's an added benefit if we go the basic_string way: I think most
compilers (gcc, msvc) now do implicit sharing on strings so passing
parameters won't be as costly as with std::vector().
Abdel.
- Re: [patch] fix plain text output Abdelrazak Younes
-