1 // © 2017 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 2006-2008, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 *
11 * FILE NAME : testTimezone.c
12 *
13 * Date Name Description
14 * 03/02/2006 grhoten Creation.
15 ******************************************************************************
16 */
17 #include "unicode/putil.h"
18 #include "unicode/ucnv.h"
19 #include "unicode/uloc.h"
20 #include "unicode/ures.h"
21 #include <stdio.h>
22 #include <string.h>
23
main(int argc,const char * const argv[])24 int main(int argc, const char* const argv[]) {
25 UErrorCode status = U_ZERO_ERROR;
26
27 ures_close(ures_open(NULL, NULL, &status));
28 if (status != U_ZERO_ERROR) {
29 printf("uloc_getDefault = %s\n", uloc_getDefault());
30 printf("Locale available in ICU = %s\n", status == U_ZERO_ERROR ? "TRUE" : "FALSE");
31 }
32 if (strcmp(ucnv_getDefaultName(), "US-ASCII") == 0) {
33 printf("uprv_getDefaultCodepage = %s\n", uprv_getDefaultCodepage());
34 printf("ucnv_getDefaultName = %s\n", ucnv_getDefaultName());
35 }
36 return 0;
37 }
38