#34576

--- In [email protected], "Sheri" <sheri...@...> wrote:
>
> > http://img7.imageshack.us/img7/2435/multibyteiv0.png
> 
> What is the
> text out to the right of the items 5 and 7 on your debug listing?
> Except for that text, it looks like all the invalid strings have a
> question mark, either at the very end, or at end minus 1.


It's an unexpected result from attempt to split double-byte 
character that CAN'T be split.

When trying to use the items 2/5/7 as a file name, it causes an 
error.


--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> I think you need to truncate since note text or can be arbitrarily
> long.  You also have to scan the string to eliminate invalid file
> characters, including those <0x20 and /\* etc.
> 
> But you cannot go just look for those bytes, as they could be the
> second byte of a double character, representing something else.
> 
> One way is to scan the bytes, and use Windows built-in function
> IsDBCSLeadByte
> to know whether to simple copy the next two bytes or whether to 
check
> the current byte.  You also use this to truncate once you pass the
> maximum.  I may try to do a special version just for this since it 
it
> not too hard and I can separate it from the normal code.
>


FYI, some guidelines for handling multi-byte strings 
(section "Double-byte considerations").

- Developing NLMs for an International Market - Novell
support.novell.com/techcenter/articles/dnd19950502.html#x12nppl

Thanks a lot.

Reply via email to