BUG: fix string <-> char conversion for non-contiguous arrays