ansi method to convert unicode string to c string