Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip files with accented name #290

Open
quantum74656 opened this issue Jul 5, 2019 · 1 comment
Open

Zip files with accented name #290

quantum74656 opened this issue Jul 5, 2019 · 1 comment

Comments

@quantum74656
Copy link

I want to zip files which names contains accentented characters. The file name within the zip file will be changed.

Examples

Build project:

<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets="CompressFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
	<Target Name="CompressFiles" >
		<ItemGroup>
			<FilesToCompress Include="Files\**\*.*" />
		</ItemGroup>
		<Zip Files="@(FilesToCompress)" WorkingDirectory="Files" ZipFileName="Result.zip" />
	</Target>
</Project>

Files attached:
AccentError.zip

Example 1

  • File names:
    • "01 NonAccentented.txt"
    • "02 Árvíztűrő tükörfúrógép.txt"
  • File names in the result zip:
    • "01 NonAccentented.txt"
    • "0"
      • The first character of the original file name (if it is non accented).

Example 2

  • File names:
    • "01 NonAccentented.txt"
    • "Árvíztűrő tükörfúrógép.txt"
      • Note that the file name starts with an accented character.
  • File names in the result zip:
    • "01 NonAccentented.txt"
    • "�1 NonAccentented.txt"
@askazakov
Copy link

Try to use https://docs.microsoft.com/en-us/visualstudio/msbuild/zipdirectory-task from standard MSBuild tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants