Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-349

port bug21847 to master (obdfilter-survey: Syntax error in some locales)

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.1.0
    • Lustre 2.1.0
    • None
    • 3
    • 21,847
    • 5014

    Description

      the awk in obdfilter_survey will encounter some problems in some locals,
      e.g. with LC_NUMERIC="de_DE" which uses a comma as the decimal separator, awk output will have the localized format,
      input can be parsed in this and the standard C locale, but arithmetic operations only grok numbers in C locale.

      1. locale | grep LC_NUMERIC
        LC_NUMERIC="de_DE@euro"
      2. awk 'BEGIN {printf "%.1f\n", 1.0}

        '
        1,0

      3. awk 'BEGIN {printf "%.1f\n", 1,0}

        '
        1,0

      4. awk 'BEGIN {printf "%.1f\n", (1,0/1)}'
        awk: BEGIN {printf "%.1fn", (1,0/1)}

        awk: ^ syntax error

      Attachments

        Activity

          People

            hongchao.zhang Hongchao Zhang
            hongchao.zhang Hongchao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: