SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2875

All non ASCII characters should be escaped in SCM Accounts before storing them

    Details

    • Number of attachments :
      0

      Description

      In fact, would be even better to ask each SCM provider to provide the SCM Account ID and not the SCM Account Full Name (as this is the case with GitHub)

        Activity

        Hide
        Jean-Baptiste Vilain added a comment -

        All non ASCII characters in authors names will be :

        • replaced by their ASCII counterpart where applicable (i.e. characters with accents)
        • replaced by "_" when no close match is available in ASCII range
        Show
        Jean-Baptiste Vilain added a comment - All non ASCII characters in authors names will be : replaced by their ASCII counterpart where applicable (i.e. characters with accents) replaced by "_" when no close match is available in ASCII range
        Hide
        Freddy Mallet added a comment -

        There are two unexpected behaviors:

        • When a non-ASCII character without any ASCII counterpart is encountered, the character is replaced by 2 '_' characters instead of being replaced by only one
        • Non-ASCII character with ASCII counterpart like 'é' are not replaced by their counterpart
        Show
        Freddy Mallet added a comment - There are two unexpected behaviors: When a non-ASCII character without any ASCII counterpart is encountered, the character is replaced by 2 '_' characters instead of being replaced by only one Non-ASCII character with ASCII counterpart like 'é' are not replaced by their counterpart
        Hide
        Jean-Baptiste Vilain added a comment -

        I could not reproduce the described behavior on my side. Some environment-related parameters might be involved in the bug.

        Show
        Jean-Baptiste Vilain added a comment - I could not reproduce the described behavior on my side. Some environment-related parameters might be involved in the bug.
        Hide
        Freddy Mallet added a comment -

        In fact @Jean-Baptiste this relate to the default java encoding defined at JVM level. If this encoding it not the one used by git blame command for instance to generate the output this can lead to such behaviour.

        Nothing can be easily done on that side. Could you just :

        • Update the ScmActivitySensor by appending the string 'with encoding {encoding}

          ' to the log line 'Retrieve SCM blame information'

        Could you also lowercase all characters to prevent any case issue at DB level ?

        Thanks

        Show
        Freddy Mallet added a comment - In fact @Jean-Baptiste this relate to the default java encoding defined at JVM level. If this encoding it not the one used by git blame command for instance to generate the output this can lead to such behaviour. Nothing can be easily done on that side. Could you just : Update the ScmActivitySensor by appending the string 'with encoding {encoding} ' to the log line 'Retrieve SCM blame information' Could you also lowercase all characters to prevent any case issue at DB level ? Thanks
        Hide
        Freddy Mallet added a comment -

        Manually tested !

        Show
        Freddy Mallet added a comment - Manually tested !
        Hide
        Jean-Baptiste Vilain added a comment -

        Skipping ITs as the various cases are covered by unit tests. Moreover we should not retrieve non-ASCII identifiers from SCM now that we use the email address instead of the name in Git.

        Show
        Jean-Baptiste Vilain added a comment - Skipping ITs as the various cases are covered by unit tests. Moreover we should not retrieve non-ASCII identifiers from SCM now that we use the email address instead of the name in Git.

          People

          • Assignee:
            Jean-Baptiste Vilain
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: