Non ho capito bene se questo pacchetto “c’è per restare” oppure se sparirà non appena listings supporterà completamente l’UTF-8, sta di fatto che secondo me, almeno per il momento, vale la pena di menzionarlo nell’Arte.
Credo proprio che tu abbia ragione. La doc. di listings è un po’ vaga, al riguardo.
National characters If you type in such characters directly as characters of codes 128–255 and use them also in listings, let the package know it—or you’ll get really funny results. extendedchars=true allows and extendedchars=false prohibits extended characters in listings. If you use them, you should load fontenc, inputenc and/or any other package which defines the characters.
! I have problems using inputenc together with listings. This could be a compatibility problem. Make a bug report as described in section 7 Troubleshooting.
Il pacchetto listingsutf8 è di Heiko Oberdiek ed è del 2007 (due cose molto buone!). Dall’abstract:
Package listings does not support files with multi-byte encodings such as UTF-8. In case of \cs{lstinputlisting} a simple workaround is possible if an one-byte encoding exists that the file can be converted to.
Non so dirti se quel pacchetto sia “lì per restare” o meno: di sicuro, un cenno nella prossima versione dell’articolo lo farò senz’altro! 😉
Grazie mille per segnalazione,
L.