Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6849183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:57:31+00:00 2026-05-27T00:57:31+00:00

I’m using RRDtool through a Perl script (RRDs) to visualize temperature readings. As I

  • 0

I’m using RRDtool through a Perl script (RRDs) to visualize temperature readings. As I want everything in the graph to be shown in Swedish (weekdays etc), I set the locale to sv_SE.UTF-8 in my Perl script with:

use POSIX qw(locale_h);
setlocale(LC_ALL, "sv_SE.UTF-8");

RRDtool gets this, and prints weekday names in Swedish. However, numerical values that are written under the RRDtool graph with GPRINT use dots instead of commas as decimal separators (XX.xx), and I’m not sure why. In Swedish, commas should be used (XX,xx). I use GPRINT like this:

GPRINT:temp_out:MIN: Min\\: %6.1lf

I’ve tried setting LC_NUMERIC and LC_CTYPE to sv_SE.UTF-8 as well, but without result. I’ve tried using sv_SE.iso8859-1, but no go. I’ve also read various printf documentation, but have yet to come up with a solution.

Has anyone managed to make RRDtool use commas instead of dots as decimal separators? Thanks!

Edit:

If I create the graph using rrdtool graph at the command line and have set LC_NUMERIC=sv_SE, I get commas as decimal separators. This leads me to believe that my Perl script doesn’t pick up on my setlocale. Still investigating…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:57:32+00:00Added an answer on May 27, 2026 at 12:57 am

    rrdtool is actually forcing LC_NUMERIC in multiple places to 'C' in order to prevent stray commas from showing up in odd places …

    to see commas in generated charts, one would have to enhance this logic a bit further in rrd_graph.c to explicitly re-enable the users original LC_NUMERIC setting prior to rendering GPRINT statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.