Skip to content

Commit 0d52ae5

Browse files
authored
Merge pull request #9 from scanoss/SP-1260-Fix-UTF-16-Filename-Encoding
SP-1260 Fix UTF-16 Filename Encoding
2 parents ea2db28 + c2f8a7e commit 0d52ae5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Upcoming changes...
1111

12+
## [0.5.2] - 2024-08-09
13+
### Added
14+
- Added support for UTF-16 filenames
15+
1216
## [0.5.1] - 2024-04-17
1317
### Added
1418
- Added tagging workflow to aid release generation
@@ -46,5 +50,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4650
[0.4.1]: https://github.com/scanoss/scanoss-winnowing.py/compare/v0.4.0...v0.4.1
4751
[0.5.0]: https://github.com/scanoss/scanoss-winnowing.py/compare/v0.4.1...v0.5.0
4852
[0.5.1]: https://github.com/scanoss/scanoss-winnowing.py/compare/v0.5.0...v0.5.1
49-
53+
[0.5.2]: https://github.com/scanoss/scanoss-winnowing.py/compare/v0.5.1...v0.5.2
5054

src/scanoss_winnowing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
THE SOFTWARE.
2323
"""
2424

25-
__version__ = '0.5.1'
25+
__version__ = '0.5.2'

src/scanoss_winnowing/winnowing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def wfp_for_contents(self, file: str, bin_file: bool, contents: bytes) -> str:
298298
return ''
299299
# Print file line
300300
content_length = len(contents)
301-
wfp_filename = file
301+
wfp_filename = repr(file).strip("'")
302302
if self.obfuscate: # hide the real size of the file and its name, but keep the suffix
303303
wfp_filename = f'{self.ob_count}{pathlib.Path(file).suffix}'
304304
self.ob_count = self.ob_count + 1

0 commit comments

Comments
 (0)