summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c6
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");