CMake/Tests/FindICU/Test/main.cpp

25 lines
501 B
C++
Raw Normal View History

2016-07-10 20:34:39 +03:00
#include <unicode/uclean.h>
#include <unicode/ustring.h>
#include <unicode/utypes.h>
2016-07-10 20:34:39 +03:00
#include <unicode/ucal.h>
2016-07-10 20:34:39 +03:00
#include <unicode/ucnv.h>
#include <unicode/udat.h>
int main()
2016-07-10 20:34:39 +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];
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);
}