>>>>> "Arnd" == Arnd Hanses <[EMAIL PROTECTED]> writes:

Arnd> Well, this works on my box even for unprintable control
Arnd> characters, they are simply ommitted. (Did not test every
Arnd> possible 8 bit combination, too lazy to write a test program).

Arnd> Is this safe on all UNICES?

Arnd> Better ideas someone?

Arnd> More generic approach desirable?

What I do not understand is that the sign is not discarded, but
replaced with some apparently random letter... Why not replace all
letters larger than 127 with 'X' or whatever?

Arnd> Shall I submit a patch or better wait?

I'd rather have Asger and/or Lars ideas about that. You can submit a
patch anyway, so that we have something concrete to discuss...

Arnd> Is this correct C++ syntax? (Please note, I can speak only a bit
Arnd> of C, so please stay patient with me)

A correct syntax would be something like

LString LString::discardSign() const
{
        LString tmp = this;
        for (int i=0; i<length(); i++)
                tmp[i] &= 0x7f;
        return tmp;
}

Which would be used as
 name = name.discardSign();

JMarc

Reply via email to