This example shows how to query character attributes.
#include <stdio.h> #include <unidef.h> int main(void) { LocaleObject locale_object = NULL; int result = 0; int rc = ULS_SUCCESS; UniChar uni_char = L' '; /* Unicode space character */ /*****************************************************************/ /* Assumes LANG environment variable set to a valid locale name, */ /* such as fr_FR */ /*****************************************************************/ rc = UniCreateLocaleObject(UNI_UCS_STRING_POINTER, (UniChar *)L"", &locale_object); if (rc != ULS_SUCCESS) { printf("UniCreateLocaleObject error: return code = %u\n", rc); return 1; } /* Query character attribute */ result = UniQueryBlank(locale_object, uni_char); if (result) printf("UniChar character %04X is a blank character\n", uni_char); else printf("UniChar character %04X is not a blank character\n", uni_char); return ULS_SUCCESS; }