[tex-live] Lua module 'socket.url' loading problem with getmap

Josef Kleber josef.kleber at gmx.de
Sat Jul 14 11:23:17 CEST 2018


Dear Akira

Am 14.07.2018 um 00:02 schrieb Akira Kakuto:
> Dear Josef,
> 
>> Can please somebody else test the following file on
>> his/her system with:
>> lualatex -shell-escape file
>>
>> %
>> % encoding is UTF-8
>> %
>> ... ...
> 
> The example works fine here on Windows for lualatex, and xelatex.
> 

Unfortunately, I have to report that your diff does not change anything
on my side.

$ kpsewhich getmap.sty
c:/texlive/2018/texmf-dist/tex/latex/getmap/getmap.sty

jk at HP-kleberj /cygdrive/c/texlive/2018/texmf-dist/tex/latex/getmap
$ diff getmap.sty.orig getmap.sty
33a34
> \RequirePackage{ifxetex}%
34a36,50
> %
> % In the case of xelatex and lualatex, \StringEncodingConvert
> % sometimes convert a clean UTF-8 string in a source into
> % a broken string. Since sources in xelatex and lualatex are
> % generically UTF-8, it is better to redefine
> % \StringEncodingConvert not to convert the string.
> %
> \ifxetex%
> \def\StringEncodingConvert#1#2#3#4{%
> \def#1{#2}%
> }\fi%
> \ifluatex%
> \def\StringEncodingConvert#1#2#3#4{%
> \def#1{#2}%
> }\fi%

I expanded your test file with my troublesome address:

%
% UTF-8 encoding
%
\documentclass{article}
\usepackage{graphicx}
\usepackage[overwrite=true]{getmap}
\begin{document}
\getmap[file=tokyo, mode=gm]{渋谷, 東京}
\includegraphics[width=10cm]{tokyo}

\getmap[mode=gm]{Bergheimer Straße 110A, 69115 Heidelberg, Germany}
%\getmap[mode=gm]{Bergheimer Strasse 110a, 69115 Heidelberg, Germany}
\includegraphics[width=10cm]{getmap}
\end{document}

Both work fine here with pdflatex and xelatex but not with lualatex!

Produced URLs:

pdflatex:

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=%e6%b8%8b%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|%e6%b8%8b%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 255 bytes
output = tokyo.png

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=Bergheimer%20Stra%c3%9fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|Bergheimer%20Stra%c3%9fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 307 bytes
output = getmap.png


xelatex:

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=%e6%b8%8b%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|%e6%b8%8b%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 255 bytes
output = tokyo.png

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=Bergheimer%20Stra%c3%9fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|Bergheimer%20Stra%c3%9fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 307 bytes
output = getmap.png


lualatex:

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=%e6%b8%3f%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|%e6%b8%3f%e8%b0%b7%2c%20%e6%9d%b1%e4%ba%ac&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 255 bytes
output = tokyo.png

getmapdl.lua:
url =
http://maps.googleapis.com/maps/api/staticmap?center=Bergheimer%20Stra%c3%3fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&size=600x400&zoom=17&markers=size:mid|color:blue|label:1|Bergheimer%20Stra%c3%3fe%20110A%2c%2069115%20Heidelberg%2c%20Germany&maptype=roadmap&scale=1&format=png&language=en&sensor=false
url length = 307 bytes
output = getmap.png

Looking at the URLs you can see that also in your Tokio example there is
a faulty 3f byte, which seems to indicate some kind of systematic error
in luatex v1.0.7. At least my example worked with the version included
in TL2016 (for sure) and most likely TL2017!

@Ulrike: Can you please test the above test file both with lualatex
v1.0.7 and v1.0.8? Have you done your last test with the original
getmapdl.lua or with the adapted version?

Best,

Josef


More information about the tex-live mailing list