Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416745 - dev-texlive/texlive-latexrecommended: listings doesn't work well with xetex and utf8 input
Summary: dev-texlive/texlive-latexrecommended: listings doesn't work well with xetex a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-20 15:19 UTC by Michał Górny
Modified: 2020-03-06 20:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Example .ltx file showing the problem (test.ltx,184 bytes, text/plain)
2012-05-20 15:19 UTC, Michał Górny
Details
Relevant header file (h2o.h,1.05 KB, text/plain)
2012-05-20 15:19 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-20 15:19:05 UTC
Created attachment 312363 [details]
Example .ltx file showing the problem

I'm using \lstinputlisting{} in my LaTeX document to list fragments of my library header files. When used in regular LaTeX, the package works fine; when used with XeTeX, utf8 chars in the header file create problems.

I will attach an example header file and a .ltx file showing the problem. The first one shows what happens when utf8 character appears in input range, and is less important to me.

The other shows what happens if the characters is outside printed line range -- and basically causes all my listings to start with 'ł'.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-20 15:19:26 UTC
Created attachment 312365 [details]
Relevant header file
Comment 2 Alexis Ballier gentoo-dev 2012-05-20 16:15:55 UTC
have you checked CTAN for updates in the listings packages ? have you tried to contact the listings package author ?
its probably simpler to contact upstream directly when that kind of problem occurs.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-20 16:28:06 UTC
Yes and yes. I've mailed the author but looking at last update date, I doubt the package is still maintained. Just wanted to have a bug for it somewhere.

I hoped I would be able to write a patch but the code is too ugly for a newbie like me. It seems to check every single character through ^^80^^81... I guess with xetex such a check would have to introduce every unicode character unless written some other way.
Comment 4 Alexis Ballier gentoo-dev 2015-07-28 06:41:37 UTC
still seems to cause problems
Comment 5 Anton Kochkov 2019-06-05 16:41:29 UTC
Should be fixed already, I believe. Worth checking and closing.

https://ctan.org/pkg/listings?lang=en