You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a § in a copyright line throws off the parser and yields unexpected results.
How To Reproduce
>>>fromscancodeimportapi>>>api.get_copyrights("androidx.appcompat_appcompat_1.6.1/res/color-v23/abc_tint_btn_checkable.xml")
{'copyrights': [{'copyright': 'Copyright (c) 2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'holders': [{'holder': '2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'authors': []}
>>>
The corresponding XML file is:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016§ The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.-->
<selectorxmlns:android="http://schemas.android.com/apk/res/android">
<itemandroid:state_enabled="false"android:color="?attr/colorControlNormal"android:alpha="?android:disabledAlpha"/>
<itemandroid:state_checked="true"android:color="?attr/colorControlActivated"/>
<itemandroid:color="?attr/colorControlNormal"/>
</selector>
System configuration
What OS are you running on? Ubuntu 22.04
What version of scancode-toolkit was used to generate the scan file? 32.0.8
What installation method was used to install/run scancode? pip
The text was updated successfully, but these errors were encountered:
Thanks... a most bizarre issue! This looks rare enough but easy to fix. The section sign (§) https://en.wikipedia.org/wiki/Section_sign has really no interesting meaning here and gets transliterated to SS which is not super happy. The simple way out will be to replace these by a space in the text cleanup step before the copryight parsing.
Description
Having a
§
in a copyright line throws off the parser and yields unexpected results.How To Reproduce
The corresponding XML file is:
System configuration
The text was updated successfully, but these errors were encountered: