A little more digging (I am not a web-dev so excuse any dumb things): - when I look at the endpoint URL in Chrome, Developer tools->Network->Header I get the following response header: [image: image.png]
- when I check what encoding Chrome has actually *used *( https://superuser.com/questions/1187374/check-the-character-encoding-of-a-given-page-in-chrome) I get: *document.characterSet"windows-1252"* So it appears that my exporter (prometheus-cpp) is not specifying the encoding, Google Chrome is detecting to display in Windows-1252. Further inspection appears to show that it *is* encoded in Windows 1252. So now what? Does Prometheus not support this encoding at all? Are there any ways to convert - say you were using an old bespoke exporter that used an older encoding and couldn't be modified? ngth: 2091 On Thu, 25 Mar 2021 at 11:07, John Dexter <[email protected]> wrote: > It's the latest version as of a few weeks ago. > Other modules which are identical except their label values contain no > special characters work fine so I am fairly confident this is the reason - > should I be able to find more verbose logs telling me exactly what it > didn't like because I could not find anything so far? > > I have wondered if the clipboard is fixing this when I copy-paste so you > can't reproduce! > > On Thu, 25 Mar 2021 at 10:52, Julien Pivotto <[email protected]> > wrote: > >> Do you have an up to date version of prometheus? I tryied this and it >> workd for me. >> >> Are you sure that those are the offending metrics? >> >> Thanks. >> >> On 25 Mar 10:47, John Dexter wrote: >> > I wouldn't be surprised though it does validate online (unless >> copy-paste >> > in chrome automatically changes the encoding!) >> > I'm using the prometheus-cpp library and I cannot find any mention of >> > character support. Does Prometheus not have any way to convert incoming >> > data? >> > The strings I am using as labels come from very old code which is quite >> > fragile, so fixing it outside our code would be far preferable - other >> code >> > may rely on it being in whatever encoding it is in. >> > >> > On Thu, 25 Mar 2021 at 10:38, Ben Kochie <[email protected]> wrote: >> > >> > > Sounds like you may have some data that's encoded in a pre-UTF-8 >> format >> > > like https://en.wikipedia.org/wiki/Windows-1257 or >> > > https://en.wikipedia.org/wiki/ISO/IEC_8859. >> > > >> > > You'll have a character encoding converter in your exporter in order >> to >> > > ingest the data. >> > > >> > > On Thu, Mar 25, 2021 at 11:32 AM John Dexter <[email protected]> >> > > wrote: >> > > >> > >> I understand that metric and label *names* are standard ASCII but >> > >> *values* support Unicode, at least according to docs. >> > >> I am working on a Swedish-language system and just realised several >> of my >> > >> targets are reporting this error, however their endpoints work just >> fine. >> > >> >> > >> I have a metric with: >> > >> >> > >> obfuscated_metric_name{location="Törn"} 0.00000000000000000 >> > >> >> > >> message_bytes_total{direction="sent",subsystem="ÖTPP"} >> 0.00000000000000000 >> > >> >> > >> I copy-pasted this from the endpoint apart from hiding the metric >> name >> > >> for privacy reasons so what is wrong? Our code is quite old C++ so >> quite >> > >> how these characters are handled is not obvious to me but we haven't >> had >> > >> this issue before (we use these strings all over the place) and when >> I >> > >> paste this text into a UTF8 validity checked, it reports no problems. >> > >> Does Prometheus have any configuration I can tweak otherwise I'm a >> bit >> > >> stuck! >> > >> >> > >> Thanks for any help. >> > >> >> > >> -- >> > >> You received this message because you are subscribed to the Google >> Groups >> > >> "Prometheus Users" group. >> > >> To unsubscribe from this group and stop receiving emails from it, >> send an >> > >> email to [email protected]. >> > >> To view this discussion on the web visit >> > >> >> https://groups.google.com/d/msgid/prometheus-users/CAGJRanhVcN%3DgsyF_QDPckNopVpUm1_4NY6cDPbxdjjKw4ZFGpA%40mail.gmail.com >> > >> < >> https://groups.google.com/d/msgid/prometheus-users/CAGJRanhVcN%3DgsyF_QDPckNopVpUm1_4NY6cDPbxdjjKw4ZFGpA%40mail.gmail.com?utm_medium=email&utm_source=footer >> > >> > >> . >> > >> >> > > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "Prometheus Users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/prometheus-users/CAGJRania%3DmzAgg%3DvSD0hjfd6%3D-CEswoMKkJPboPy8PK-L1J%3DTg%40mail.gmail.com >> . >> >> -- >> Julien Pivotto >> @roidelapluie >> > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAGJRaniLeZgiv_p%3D9RpN55%2B8W0_iUFJiYYLGb%2BoCjMg6%3DewOXg%40mail.gmail.com.

