Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | > Note that it will most likely only work properly on linux. | > (I use wchar_t in a couple of places and that changes size on | > windows, also I use iconv quite heavily for the moment.) | | I've been watching your progress on cvslog; I like the way it's looking. All | those ucs2_to_ucs4, utf8_to_ucs4 methods are extremely intuitive. However, I | note that: | 1 They don't conform to your naming convention. I find this especially funny | after the the hard time you gave Abdel about this ;-)
:-) It is not my naming convention. And I am not sure that I agree with what is in the docs. I am perhaps to good at discussing with different hats on. (If we begin the discussion with: "What naming convention do we want?", instead of "What naming convention does our rules say we should use?" then I might seem like a completely different person.) | 2 The code itself in many of these functions reinvents the wheel. It | would be nice if ucs2_to_ucs4 et al were just iconv wrappers. Aren't they just iconv wrappers? In what way are they reinventing the wheel? | Which brings me to your second point: what's wrong with using iconv quite | heavily? Nothing really, but it is probably a lot slower than just doing: uint16_t ucs4_to_ucs2(uint32_t from) { // Add a check for out-of-bounds return uint16_t(from); } -- Lgb