Angus Leeming <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
| > | 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?
| 
| Maybe nothing. I guess these filters made me suspicious:
| 
|         in.push_back(static_cast<char>(s & 0xff000000)); 
|         in.push_back(static_cast<char>(s & 0x00ff0000)); 
|         in.push_back(static_cast<char>(s & 0x0000ff00)); 
|         in.push_back(static_cast<char>(s & 0x000000ff)); 

iconv only takes char* args, so I have to split the uint32_t into its
individual bytes. (same for unsigned short and ucs2).

I am planning to go back to the conversion functions and see if I can
generalize more (refactor) and also if they can be made faster and use
less memory.

-- 
        Lgb

Reply via email to