2016-07-10 20:34:39 +03:00
|
|
|
#include <unicode/uclean.h>
|
2016-07-13 17:01:02 +03:00
|
|
|
#include <unicode/ustring.h>
|
|
|
|
#include <unicode/utypes.h>
|
2016-07-10 20:34:39 +03:00
|
|
|
|
2016-07-13 17:01:02 +03:00
|
|
|
#include <unicode/ucal.h>
|
2016-07-10 20:34:39 +03:00
|
|
|
#include <unicode/ucnv.h>
|
|
|
|
#include <unicode/udat.h>
|
|
|
|
|
2016-07-13 17:01:02 +03:00
|
|
|
int main()
|
2016-07-10 20:34:39 +03:00
|
|
|
{
|
2016-07-13 17:01:02 +03:00
|
|
|
UConverter* cnv = 0;
|
2016-07-10 20:34:39 +03:00
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
|
|
ucnv_open(NULL, &status);
|
|
|
|
|
|
|
|
UChar uchars[100];
|
2016-07-13 17:01:02 +03:00
|
|
|
const char* chars = "Test";
|
|
|
|
if (cnv && U_SUCCESS(status)) {
|
2016-07-10 20:34:39 +03:00
|
|
|
int32_t len = ucnv_toUChars(cnv, uchars, 100, chars, -1, &status);
|
|
|
|
}
|
|
|
|
|
|
|
|
ucnv_close(cnv);
|
|
|
|
u_cleanup();
|
|
|
|
return (U_FAILURE(status) ? 1 : 0);
|
|
|
|
}
|