diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-23 15:56:41 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-23 15:56:41 +0000 |
commit | e3bfabd4539b061c18372b0e995a432ceade7c32 (patch) | |
tree | 6760e0178f917e5989b8b61d96db00f6873a525b /Build | |
parent | 9c5cdb75e355c4041ec4d706dbb8860706f9d9e2 (diff) |
texk/dvipdfm-x: Support UTF-16 with null bytes as labels (from M. Hosoda).
git-svn-id: svn://tug.org/texlive/trunk@39836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdoc.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 079c27dd113..c6dcfecc7a2 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,7 @@ +2016-02-23 Masamichi HOSODA <trueroad@trueroad.jp> + + * pdfdoc.c: Support UTF-16 with null bytes as labels. + 2016-02-23 Jonathan Kew <jfkthame@gmail.com> * dvicodes.h, dvi.c, pdfdev.[ch]: Support xetex 0.99995 output diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c index 27a67715d35..dd4cdf81a57 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.c +++ b/Build/source/texk/dvipdfm-x/pdfdoc.c @@ -1595,6 +1595,7 @@ pdf_doc_add_goto (pdf_obj *annot_dict) { pdf_obj *subtype = NULL, *A = NULL, *S = NULL, *D = NULL, *D_new, *dict; const char *dest, *key; + int destlen = 0; if (!pdoc.check_gotos) return; @@ -1641,8 +1642,10 @@ pdf_doc_add_goto (pdf_obj *annot_dict) } } - if (PDF_OBJ_STRINGTYPE(D)) + if (PDF_OBJ_STRINGTYPE(D)) { dest = (char *) pdf_string_value(D); + destlen = pdf_string_length(D); + } #if 0 /* Names as destinations are not supported by dvipdfmx */ else if (PDF_OBJ_NAMETYPE(D)) @@ -1655,7 +1658,7 @@ pdf_doc_add_goto (pdf_obj *annot_dict) else goto error; - D_new = ht_lookup_table(&pdoc.gotos, dest, strlen(dest)); + D_new = ht_lookup_table(&pdoc.gotos, dest, destlen); if (!D_new) { char buf[10]; @@ -1664,7 +1667,7 @@ pdf_doc_add_goto (pdf_obj *annot_dict) */ sprintf(buf, "%x", ht_table_size(&pdoc.gotos)); D_new = pdf_new_string(buf, strlen(buf)); - ht_append_table(&pdoc.gotos, dest, strlen(dest), D_new); + ht_append_table(&pdoc.gotos, dest, destlen, D_new); } { |