mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87e57e3a9a | ||
|
|
785d0dcebf | ||
|
|
2314776f55 | ||
|
|
473f5d8189 | ||
|
|
be971cb6f7 |
@@ -2,7 +2,7 @@ version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: microsoft/dotnet:2.0.7-sdk-2.1.105
|
||||
- image: microsoft/dotnet:2.0.7-sdk-2.1.200
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace SharpCompress.Common
|
||||
#if NETSTANDARD1_0
|
||||
return Decode(bytes, 0, bytes.Length);
|
||||
#else
|
||||
//allow forced and custom to override this.
|
||||
if (CustomDecoder != null || Forced != null)
|
||||
{
|
||||
return Decode(bytes, 0, bytes.Length);
|
||||
}
|
||||
var extendedAsciiEncoding = Encoding.GetEncoding(437);
|
||||
return extendedAsciiEncoding.GetString(bytes, 0, bytes.Length);
|
||||
#endif
|
||||
@@ -71,7 +76,7 @@ namespace SharpCompress.Common
|
||||
|
||||
public Func<byte[], int, int, string> GetDecoder()
|
||||
{
|
||||
return CustomDecoder ?? ((bytes, index, count) => (Default ?? Encoding.UTF8).GetString(bytes, index, count));
|
||||
return CustomDecoder ?? ((bytes, index, count) => GetEncoding().GetString(bytes, index, count));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
<PropertyGroup>
|
||||
<AssemblyTitle>SharpCompress - Pure C# Decompression/Compression</AssemblyTitle>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<VersionPrefix>0.21.0</VersionPrefix>
|
||||
<AssemblyVersion>0.21.0</AssemblyVersion>
|
||||
<FileVersion>0.21.0</FileVersion>
|
||||
<VersionPrefix>0.21.1</VersionPrefix>
|
||||
<AssemblyVersion>0.21.1</AssemblyVersion>
|
||||
<FileVersion>0.21.1</FileVersion>
|
||||
<Authors>Adam Hathcock</Authors>
|
||||
<TargetFrameworks Condition="'$(LibraryFrameworks)'==''">net45;net35;netstandard1.0;netstandard1.3;netstandard2.0</TargetFrameworks>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
|
||||
Reference in New Issue
Block a user