I'm trying put this code to tex document:

\begin{lstlisting}[caption={Definição dos UUIDs no microcontrolador,captionpos=b]
#define SERVICE_UUID                       "ab0828b1-198e-4351-b779-901fa0e0371e"
#define CHARACTERISTIC_UUID_ID    "1a220d0a-6b06-4767-8692-243153d94d85"
#define DESCRIPTOR_UUID_EVENTO "c996a2b1-fe24-4b57-98b7-b06227110244"
#define DESCRIPTOR_UUID_ID           "ec6e1003-884b-4a1c-850f-1cfce9cf6567"

but when I compile this, the follow error occurs:

enter image description here

I've other lstlisting on my document and all works fine, just it not works.

  • 2
    You're missing a } after microcontrolador
    – egreg
    Nov 19 '18 at 12:29
  • Thank you so much, but other error occurs now: Package inputenc Error: Invalid UTF-8 byte sequence. #define DESCRIPTOR_UUID_EVENTO "
    – Augusto
    Nov 19 '18 at 12:30
  • 2
    There is a spurious U+FEFF character between EVENTO and ". Select from TO up to "c and retype that part.
    – egreg
    Nov 19 '18 at 12:32

Two problems:

  1. The brace { after caption= has no matching }.

  2. Between EVENTO and `"c99" a spurious character U+FEFF (ZERO WIDTH NO-BREAK SPACE) has crept in. Remove it.

How did I find the invisible character? I copied the line from your code and pasted it at https://r12a.github.io/app-conversion/

After clicking “Convert”, the box U+hex reports

  • Excellent tool for catch spurious spaces, thanks as always!! :).
    – manooooh
    Dec 3 '18 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.