Output from Context standalone (actual version) has wrong utf-8 encoding
Hi list rendering a very easy formula with greek text in it produces a pdf-document that has not a valid utf-8 string. I use evince for displaying pdfs under ubuntu linux. The document appears correctly on the screen but stops printing after a greek letter in a formula. The error-report says: Internal Error: cairo context error: input string not valid UTF-8 The same document compiled in live.contextgarden.net doesn't produce a mistake and can be printed with evince. I can still print the document correctly using 'lpr name.pdf', so it's not a big problem for me. But I don't know if that could be a problem for someone else. Test-Document: \starttext $3\omega$ \stoptext Tell me, what I can do to help. Thanks Christian
On 2013-06-17, at 12:05 PM, Christian Prim
Hi list
rendering a very easy formula with greek text in it produces a pdf-document that has not a valid utf-8 string.
I use evince for displaying pdfs under ubuntu linux. The document appears correctly on the screen but stops printing after a greek letter in a formula.
The error-report says: Internal Error: cairo context error: input string not valid UTF-8
How are you compiling the document (mkii or mkiv) Can you attach the actual PDF as well (small attachments are allowed on the list).
The same document compiled in live.contextgarden.net doesn't produce a mistake and can be printed with evince.
contextgarden uses Mkii rather than Mkiv Aditya
Hi Aditya
I use Mkiv both standalone and live.contextgarden.net.
Document:
\starttext
$3v$
\stoptext
Output from contextgarden and standalone attached.
log from contextgarden:
mtx-context | run 1: luatex
--fmt="/opt/context/current/tex/texmf-cache/luatex-cache/context/062e428d731d188f38ba0b7527199e92/formats/cont-en"
--lua="/opt/context/current/tex/texmf-cache/luatex-cache/context/062e428d731d188f38ba0b7527199e92/formats/cont-en.lui"
--backend="pdf" "./texweb.tex" \stoptext
This is LuaTeX, Version beta-0.70.1-2012052416 (rev 4277)
\write18 enabled.
(texweb.tex
ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.11.6 int: english/english
system > cont-new.mkiv loaded
(/opt/context/current/tex/texmf-context/tex/context/base/cont-new.mkiv
system > beware: some patches loaded from cont-new.mkiv
)
system > texweb.top loaded
(texweb.top)
fonts > latin modern fonts are not preloaded
languages > language en is active
{/opt/context/current/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts > preloading latin modern fonts (second stage)
fonts > typescripts > unknown: library 'loc'
{/opt/context/current/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/context/current/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts > virtual math > unable to resolve name mapsfromchar
fonts > fallback modern rm 12pt is loaded
backend > xmp > using file
'/opt/context/current/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1
){/opt/context/current/tex/texmf/fonts/enc/dvips/lm/lm-mathit.enc}
mkiv lua stats > used config file -
/opt/context/current/tex/texmf/web2c/texmfcnf.lua
mkiv lua stats > used cache path - readable:
'/opt/context/current/tex/texmf-cache/luatex-cache/context/062e428d731d188f38ba0b7527199e92'
(order 1)
mkiv lua stats > used cache path - readable:
'/tmp/texweb/luatex-cache/context/062e428d731d188f38ba0b7527199e92'
(order 2)
mkiv lua stats > used cache path - writable:
'/tmp/texweb/luatex-cache/context/062e428d731d188f38ba0b7527199e92'
mkiv lua stats > resource resolver - loadtime 0.010 seconds,
0 scans with scantime 0.000 seconds, 0 shared scans, 47 found files,
scanned paths:
mkiv lua stats > stored bytecode data - 303 modules, 65 tables, 368 chunks
mkiv lua stats > cleaned up reserved nodes - 39 nodes, 9 lists of 438
mkiv lua stats > node memory usage - 2 glue, 2 penalty, 9
attribute, 29 glue_spec, 3 attribute_list
mkiv lua stats > node list callback tasks - 6 unique task lists, 6
instances (re)created, 134 calls
mkiv lua stats > used backend - pdf (backend for
directly generating pdf output)
mkiv lua stats > loaded patterns - en::2
mkiv lua stats > jobdata time - 0.001 seconds saving,
0.000 seconds loading
mkiv lua stats > callbacks - 263 direct, 558
indirect, 821 total
mkiv lua stats > lxml preparation time - 0.000 seconds, 0 nodes,
11 lpath calls, 0 cached calls
mkiv lua stats > result saved in file - texweb.pdf
mkiv lua stats > loaded fonts - 33 files: stmary10.afm
lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf
lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf
lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf
lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf
eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm
msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm
lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm
rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats > fonts load time - 0.291 seconds
mkiv lua stats > luatex banner - this is luatex, version
beta-0.70.1-2012052416 (rev 4277)
mkiv lua stats > control sequences - 33665 of 65536 + 100000
mkiv lua stats > current memory usage - 30 MB (ctx: 31 MB)
mkiv lua stats > runtime - 0.805 seconds, 1
processed pages, 1 shipped pages, 1.242 pages/second
Log from standalone:
(/home/christian/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2013.06.10 22:51 MKIV beta fmt: 2013.6.13 int: english/english
system > 'cont-new.mkiv' loaded
(/home/christian/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system > files > jobname 'tmp', input './tmp', result 'tmp'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
(/tmp/latexila-X3AGYW/tmp.tex{/home/christian/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts > preloading latin modern fonts (second stage)
fonts > typescripts > unknown library 'loc'
{/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts > 'fallback modern rm 12pt' is loaded
backend > xmp > using file
'/home/christian/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1
) )
system > files > start used files
used files > 1: filename=cont-yes.mkiv filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
usedmethod=database
used files > 2: filename=cont-new.mkiv filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/cont-new.mkiv
usedmethod=database
used files > 3: filename=lang-us.lua filetype=lua
foundname=/home/christian/context/tex/texmf-context/tex/context/patterns/lang-us.lua
usedmethod=database
used files > 4: filename=/tmp/latexila-X3AGYW/tmp.tex
foundname=/tmp/latexila-X3AGYW/tmp.tex usedmethod=direct
used files > 5: filename=mkiv-base.map filetype=map format=map
foundname=/home/christian/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map
usedmethod=database
used files > 6: filename=lm.lfg filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/fonts/lm.lfg
usedmethod=database
used files > 7: filename=lm-math.lfg filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/fonts/lm-math.lfg
usedmethod=database
used files > 8: filename=lm-math.map filetype=map format=map
foundname=/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-math.map
usedmethod=database
used files > 9: filename=lm-rm.map filetype=map format=map
foundname=/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map
usedmethod=database
used files > 10: filename=lmroman12-regular filetype=otf
format=otf foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
usedmethod=database
used files > 11: filename=latinmodern-math.otf
filetype=opentypefonts
foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
usedmethod=database
used files > 12: filename=latinmodern-math.otf filetype=otf
format=otf foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
usedmethod=database
used files > 13: filename=lpdf-pdx.xml filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml
usedmethod=database
system > files > stop used files
system > structure > start used structure
used structure > text: tmp
system > structure > stop used structure
system > files > start used files
used file > 1: filename=cont-yes.mkiv filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
usedmethod=database
used file > 2: filename=cont-new.mkiv filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/cont-new.mkiv
usedmethod=database
used file > 3: filename=lang-us.lua filetype=lua
foundname=/home/christian/context/tex/texmf-context/tex/context/patterns/lang-us.lua
usedmethod=database
used file > 4: filename=/tmp/latexila-X3AGYW/tmp.tex
foundname=/tmp/latexila-X3AGYW/tmp.tex usedmethod=direct
used file > 5: filename=mkiv-base.map filetype=map format=map
foundname=/home/christian/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map
usedmethod=database
used file > 6: filename=lm.lfg filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/fonts/lm.lfg
usedmethod=database
used file > 7: filename=lm-math.lfg filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/fonts/lm-math.lfg
usedmethod=database
used file > 8: filename=lm-math.map filetype=map format=map
foundname=/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-math.map
usedmethod=database
used file > 9: filename=lm-rm.map filetype=map format=map
foundname=/home/christian/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map
usedmethod=database
used file > 10: filename=lmroman12-regular filetype=otf
format=otf foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
usedmethod=database
used file > 11: filename=latinmodern-math.otf
filetype=opentypefonts
foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
usedmethod=database
used file > 12: filename=latinmodern-math.otf filetype=otf
format=otf foundname=/home/christian/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
usedmethod=database
used file > 13: filename=lpdf-pdx.xml filetype=tex
foundname=/home/christian/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml
usedmethod=database
system > files > stop used files
system > options > start commandline options
used option > currentrun="1"
used option > fulljobname="./tmp.tex"
used option > input="./tmp.tex"
used option > kindofrun="1"
used option > maxnofruns="8"
used option > no-parse-first-line="true"
system > options > stop commandline options
system > options > start commandline files
used file > 1: ./tmp.tex
system > options > stop commandline files
mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats > used cache path:
/home/christian/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats > resource resolver: loadtime 0.006 seconds, 0 scans
with scantime 0.000 seconds, 0 shared scans, 13 found files, scanned
paths: <none>
mkiv lua stats > stored bytecode data: 330 modules (0.120 sec), 69
tables (0.000 sec), 399 chunks (0.120 sec)
mkiv lua stats > cleaned up reserved nodes: 41 nodes, 9 lists of 441
mkiv lua stats > node memory usage: 2 glue, 2 penalty, 9 attribute,
28 glue_spec, 3 attribute_list
mkiv lua stats > node list callback tasks: 6 unique task lists, 6
instances (re)created, 39 calls
mkiv lua stats > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats > loaded patterns: en::2, load time: 0.000
mkiv lua stats > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats > callbacks: 137 direct, 180 indirect, 317 total
mkiv lua stats > randomizer: resumed with value 0.42518211455326
mkiv lua stats > lxml preparation time: 0.000 seconds, 0 nodes, 15
lpath calls, 0 cached calls
mkiv lua stats > result saved in file: tmp.pdf, compresslevel 3,
objectcompreslevel 3
mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf
(experimental), lmroman12-regular.otf
mkiv lua stats > fonts load time: 0.142 seconds
mkiv lua stats > luatex banner: this is luatex, version
beta-0.76.0-2013040516 (tex live 2013/dev)(rev 4627)
mkiv lua stats > control sequences: 37409 of 65536 + 100000
mkiv lua stats > current memory usage: 45 MB (ctx: 45 MB)
mkiv lua stats > runtime: 0.409 seconds, 1 processed pages, 1 shipped
pages, 2.445 pages/second
2013/6/17 Aditya Mahajan
On 2013-06-17, at 12:05 PM, Christian Prim
wrote: Hi list
rendering a very easy formula with greek text in it produces a pdf-document that has not a valid utf-8 string.
I use evince for displaying pdfs under ubuntu linux. The document appears correctly on the screen but stops printing after a greek letter in a formula.
The error-report says: Internal Error: cairo context error: input string not valid UTF-8
How are you compiling the document (mkii or mkiv) Can you attach the actual PDF as well (small attachments are allowed on the list).
The same document compiled in live.contextgarden.net doesn't produce a mistake and can be printed with evince.
contextgarden uses Mkii rather than Mkiv
Aditya
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
___________________________________________________________________________________
On 6/17/2013 6:55 PM, Christian Prim wrote:
Hi Aditya
I use Mkiv both standalone and live.contextgarden.net http://live.contextgarden.net.
Document: \starttext $3v$ \stoptext it's a 𝑣 i.e. a character with unicode 0x1D463 so it's probably a viewer/editor cut/paste issue
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans
I used texlive (2012) before standalone. There was never a problem. Same
editor, same viewer. With standalone there is a problem just for printing
from viewer "evince". I can print the very same document with lpr
(command-line) without problem. I don't think there is a real problem with
the pdf. "evince" manipulates somehow the pdf-document before sending to
printer. There the error occurs. Strange that the output from context in
texlive didn't have this problem.
Has the output-format changed since last year?
Thanks
Christian
2013/6/17 Hans Hagen
On 6/17/2013 6:55 PM, Christian Prim wrote:
Hi Aditya
I use Mkiv both standalone and live.contextgarden.net http://live.contextgarden.net**.
Document: \starttext $3v$ \stoptext
it's a 𝑣 i.e. a character with unicode 0x1D463 so it's probably a viewer/editor cut/paste issue
Hans
------------------------------**------------------------------**----- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ------------------------------**------------------------------**-----
______________________________**______________________________** _______________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/** listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________**______________________________** _______________________
On 06/17/2013 07:29 PM, Christian Prim wrote:
I used texlive (2012) before standalone. There was never a problem. Same editor, same viewer. With standalone there is a problem just for printing from viewer "evince".
Just some anecdote: I was working on a presentation style last week and was getting really weird results, with background elements shifting on the page randomly. I suspected that some update had brought changes in Metapost and tried on my laptop with a slightly older version, and everything was OK. Then I installed the latest version on the laptop and tried again - still OK. After two hours of fuzzing around, I finally understood that it was a problem with evince, not with the pdf - if I opened the same file with okular or Adobe Reader, everything was fine. So I wouldn't trust evince; looks like the clowns in charge of gnome have managed to break their pdf viewer as well. Thomas
On Mon, 17 Jun 2013 19:34:51 +0200
"Thomas A. Schmitz"
Just some anecdote: I was working on a presentation style last week and was getting really weird results, with background elements shifting on the page randomly. I suspected that some update had brought changes in Metapost and tried on my laptop with a slightly older version, and everything was OK. Then I installed the latest version on the laptop and tried again - still OK. After two hours of fuzzing around, I finally understood that it was a problem with evince, not with the pdf - if I opened the same file with okular or Adobe Reader, everything was fine. So I wouldn't trust evince; looks like the clowns in charge of gnome have managed to break their pdf viewer as well.
Hmmm Remind me: PDF stands for "Portable Document Format", or something else? Alan
On 06/17/2013 08:22 PM, Alan BRASLAU wrote:
Hmmm
Remind me: PDF stands for "Portable Document Format", or something else?
Yes, it is very curious, but unfortunately, pdf viewers behave very inconsistently, especially on linux. When you use something like shading or transparencies, you can have very nasty surprises. Though I must say that in my experience, okular has been quite good. Adobe Reader does some funny things with colors and makes fonts look too skinny, and evince has some bizarre problems. Thomas
On 6/17/2013 8:34 PM, Thomas A. Schmitz wrote:
On 06/17/2013 08:22 PM, Alan BRASLAU wrote:
Hmmm
Remind me: PDF stands for "Portable Document Format", or something else?
Yes, it is very curious, but unfortunately, pdf viewers behave very inconsistently, especially on linux. When you use something like shading or transparencies, you can have very nasty surprises. Though I must say that in my experience, okular has been quite good. Adobe Reader does some funny things with colors and makes fonts look too skinny, and evince has some bizarre problems.
cut and paste from viewers depends on - documentproviding tounicode - viewer dealing with unicode - os copy buffer dealing with unicode / locales - receiving (editor, mailer) dealing with unicode / locales e.g. here - acrobat copies the proper math italic v - sumatrapdf copies nothing - okular copies a v - pdftotext output nothing so .. who knows Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, Jun 17, 2013 at 9:17 PM, Hans Hagen
- pdftotext output nothing
so .. who knows
Hans
just to say $ pdftotext -v pdftotext version 0.20.4 Copyright 2005-2012 The Poppler Developers - http://poppler.freedesktop.org Copyright 1996-2011 Glyph & Cog, LLC is ok -- luigi
participants (6)
-
Aditya Mahajan
-
Alan BRASLAU
-
Christian Prim
-
Hans Hagen
-
luigi scarso
-
Thomas A. Schmitz