fork download
  1. int setDBDefaultLocale(sqlite3 * db, const char * const zLocale)
  2. {
  3. int rc;
  4. sqlite3_stmt* stmt;
  5. UErrorCode status = U_ZERO_ERROR;
  6. UCollator *pUCollator= ucol_open(zLocale ? zLocale : uloc_getDefault(), &status);
  7.  
  8. if(!U_SUCCESS(status))
  9. {
  10. return SQLITE_ERROR;
  11. }
  12.  
  13. // create the collation
  14. if ((rc = sqlite3_create_collation_v2(db, "LOCALE", SQLITE_UTF16,
  15. (void *)pUCollator, icuCollationColl, icuCollationDel)) != SQLITE_OK)
  16. {
  17. ucol_close(pUCollator);
  18.  
  19. return rc;
  20. }
  21.  
  22. // set the default collating sequence to the locale collation
  23. db->pDfltColl = sqlite3FindCollSeq(db, ENC(db), "LOCALE", 0);
  24.  
  25. return db->pDfltColl ? SQLITE_OK : SQLITE_ERROR;
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1: error: expected ‘)’ before ‘*’ token
stdout
Standard output is empty