views:

437

answers:

1

Hello,

Is there a elegant way to convert 'const wchar *' to 'const char *' on Mac OS X?

Kat

+1  A: 

Use wcstombs:

size_t wcstombs(char *dest, const wchar_t *src, size_t n);

Make sure you have your locale set appropriately.

ankon
It took me two reads to recognize that it is wcs to mbs, and has nothing to do with tombs :)
OregonGhost