I'm not too familiar with GSFromUnicode(), but couldn't you treat this
function in the same way that CoreBase treats ucnv_fromUnicode()? That is,
pass the buffer into GSFromUnicode() with GSUniStrict option. If it
returns NO, adjust the src and use NULL for dst. Would that work?
That said, I think it would be a good idea if the function you came up with
would have the same signature as GSStringEncodingFromUnicode() in
corebase. I'd like to one day be able to share more code between the two
projects and GSStringEncodingFromUnicode() already supports that method's
requirements.