mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-05 16:20:10 +08:00
This is a follow-on in that the old utf8 code was still being used in ncgen to convert utf8->utf16 when converting cdl to Java (see genj.c). The new code apparently has no utf16 support, but it does have utf32 support. Converting utf32 -> utf16 can be approximated by truncating the 32bits to 16 bits, unless the top 16 bits are not zero. This latter condition is unlikely to be common because it implies use of some rather obscure characters. So solution is to convert to utf32 and truncate to 16 bits to get utf16. An error is reported if the high-order truncated 16 bits are not zero. If we get complaints, then I will figure out how to convert full utf32 to a utf16 pair. Other changes: 1. removed the old code from ncgen. 2. changed UTF8PROC_DLLEXPORT (in utf8proc) to EXTERNL and added appropriate includes. This should fix issue https://github.com/Unidata/netcdf-c/issues/404, but since we cannot duplicate the failure, I am not quite sure. |
||
---|---|---|
.. | ||
.gitignore | ||
ceconstraints.h | ||
CMakeLists.txt | ||
err_macros.h | ||
fbits.h | ||
Makefile.am | ||
nc3dispatch.h | ||
nc3internal.h | ||
nc4dispatch.h | ||
nc4internal.h | ||
nc_hashmap.h | ||
nc_logging.h | ||
nc_tests.h | ||
nc.h | ||
ncaux.h | ||
ncbytes.h | ||
ncconfigure.h | ||
ncdap.h | ||
ncdimscale.h | ||
ncdispatch.h | ||
ncexternl.h | ||
nchashmap.h | ||
nclist.h | ||
nclog.h | ||
ncoffsets.h | ||
ncrc.h | ||
nctestserver.h | ||
nctime.h | ||
ncuri.h | ||
ncutf8.h | ||
ncwinpath.h | ||
netcdf_f.h | ||
netcdf_mem.h | ||
netcdf_meta.h.in | ||
netcdf_par.h | ||
netcdf.h | ||
onstack.h | ||
rnd.h | ||
XGetopt.h |