blob: 45801592e49c0effdb1ffac58ead8ecb3255c97b [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*-
2 * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
4 */
5#ifndef _UTF8String_H_
6#define _UTF8String_H_
7
Lev Walkinf15320b2004-06-03 03:38:44 +00008#include <OCTET_STRING.h>
9
Lev Walkin11c3e172004-09-24 21:00:50 +000010typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */
Lev Walkinf15320b2004-06-03 03:38:44 +000011
Lev Walkin5e033762004-09-29 13:26:15 +000012extern asn_TYPE_descriptor_t asn_DEF_UTF8String;
Lev Walkinf15320b2004-06-03 03:38:44 +000013
Lev Walkinf15320b2004-06-03 03:38:44 +000014asn_struct_print_f UTF8String_print;
Lev Walkina9cc46e2004-09-22 16:06:28 +000015asn_constr_check_f UTF8String_constraint;
Lev Walkinf15320b2004-06-03 03:38:44 +000016
Lev Walkinedc7d592004-10-02 15:55:07 +000017/*
18 * Returns length of the given UTF-8 string in characters,
19 * or a negative error code:
20 * -1: UTF-8 sequence truncated
21 * -2: Illegal UTF-8 sequence start
22 * -3: Continuation expectation failed
23 * -4: Not minimal length encoding
24 * -5: Invalid arguments
25 */
26ssize_t UTF8String_length(const UTF8String_t *st);
Lev Walkinf15320b2004-06-03 03:38:44 +000027
28#endif /* _UTF8String_H_ */