summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorJoey Adams2010-07-24 22:28:46 +0000
committerJoey Adams2010-07-24 22:28:46 +0000
commitf475e581b72b8c42cf951f6653610d15e71caeee (patch)
tree0a30a239ae10b3ed799688ecbd6791d4488a2cff /util.h
parentb32257221b4b8e15fada7aabd0fe6e129e00d3e8 (diff)
* Migrated my Unicode functions to util.c and made them rely more on
PostgreSQL's pg_wchar.h routines. * Touched up various functions' documentation. json_node's are currently encoded in UTF-8, and the JSON module is not 100% compatible with arbitrary server encodings yet. I plan to switch from UTF-8 to the server encoding pretty soon, after which JSON should be a well-behaved datatype as far as charsets go.
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.h b/util.h
index 40692cb..456708a 100644
--- a/util.h
+++ b/util.h
@@ -46,5 +46,8 @@ Oid enumLabelToOid(const char *typname, const char *label);
size_t utf8_substring(const char *src, size_t srcbytes,
size_t start, size_t length,
const char **out_start, size_t *out_bytes);
+void utf8_decode_char_nocheck(const char **sp, unsigned int *uc);
+bool utf8_validate(const char *str, size_t length);
+int utf8_encode_char(char *out, unsigned int uc);
#endif