helpListings package for LaTeX - Support: sr #286, Re: Possible bug in listingsutf8

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

sr #286: Re: Possible bug in listingsutf8

Submitted by:  Brooks Moses <brooks>
Submitted on:  Tue Apr 12 20:03:21 2011  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Tue Apr 12 20:03:21 2011, original submission:

Marc Baudoin wrote, on Tue, 2 Nov 2010 10:22:24 +0100:


Heiko Oberdiek <heiko.oberdiek@googlemail.com> écrit :

> On Mon, Nov 01, 2010 at 06:26:39PM +0100, Marc Baudoin wrote:
>
> > I believe I found a bug in listingsutf8. Consider the attached
> > MWE. The caption is properly displayed when it is above the
> > listing but it is not when it is below. The same listing in a
> > document encoded in ISO 8859-15 has a correct caption in both
> > cases when using the plain listings package. I'm using TeX Live
> > 2010 last updated this morning.
> >
> > Any idea?
>
> The bug is in package listings:
> * caption top: input encoding before \lstinputlisting is used.
> * caption below: input encoding of option `inputencoding' is used.


Holy cow!

> A fix is not easy, especially because utf8.def unhappily defines
> the input characters globally. The other encodings use
> local assignments.
>
> In theory listings would have to close the group where
> \inputencoding is used before the lower caption is set,
> but probably many other macros/registers are reset that are still
> needed.
>
> Perhaps it can remember the current input encoding
> (inputenc: \inputencodingname) and set it before the caption
> is set.
>
> Workaround:
> * Avoiding 8bit characters in below captions,


Which is probably easier and that's what I'll do.

> * or try:
> caption={[text]{\inputencoding{utf8}text}}


Or wait for listings2, which is in beta since nearly a year with
no news from Carsten Heinz since January. Sigh...

Anyway, thank you very much for your help!

Brooks Moses <brooks>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by brooks (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray