diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-05-23 18:20:07 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-05-23 18:20:07 (GMT) |
commit | 985af5617fe40c9a6e9a0083dc889e56a7add362 (patch) | |
tree | cc6bb4e196fd7502ad4f563793d370e322bea4d2 /src/H5Tconv.c | |
parent | edecc60b50455a42102cee189ccdac5c1bc2104e (diff) | |
download | hdf5-985af5617fe40c9a6e9a0083dc889e56a7add362.zip hdf5-985af5617fe40c9a6e9a0083dc889e56a7add362.tar.gz hdf5-985af5617fe40c9a6e9a0083dc889e56a7add362.tar.bz2 |
[svn-r10785] Purpose:
Feature
Description:
Added "support" for UTF-8 character encoding.
Solution:
Wrote tests to check that UTF-8 can be used in a number of places in
HDF5 (object names, data, etc.). These tests live in test/tunicode.c.
Added a new UTF-8 character encoding for datatypes.
Platforms tested:
mir, modi4, heping
Misc. update:
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 5b4b4b7..d4125a1 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -3907,8 +3907,10 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad precision"); if (0 != src->shared->u.atomic.offset || 0 != dst->shared->u.atomic.offset) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad offset"); - if (H5T_CSET_ASCII != src->shared->u.atomic.u.s.cset || H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad character set"); + if (H5T_CSET_ASCII != src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != src->shared->u.atomic.u.s.cset) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set"); + if (H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != dst->shared->u.atomic.u.s.cset) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set"); if (src->shared->u.atomic.u.s.pad<0 || src->shared->u.atomic.u.s.pad>=H5T_NPAD || dst->shared->u.atomic.u.s.pad<0 || dst->shared->u.atomic.u.s.pad>=H5T_NPAD) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad character padding"); |