Skip to content

The AmazonS3Uri class does not seem to support some characters #3585

Open
@mhroberts7734

Description

@mhroberts7734

Describe the bug

When using the AmazonS3Uri class to parse pre-signed urls to get the key and bucket name, The class gets some characters incorrect.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

key = "180天OTB+(锦江)1216+-+sample+(1).xlsx"

Current Behavior

key = "180天OTB+(é\u0094¦æ±\u009fï¼\u00891216+-+sample+(1).xlsx"

Reproduction Steps

var filename = "https://my-bucket.s3.us-east-1.amazonaws.com/180天OTB+(锦江)1216+-+sample+(1).xlsx";
var url = new Uri(filename);
var s3Url = new AmazonS3Uri(url);
var key = s3Url.Key;
var s3Key = Uri.UnescapeDataString(url.AbsolutePath);

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.S3 3.7.410.8

Targeted .NET Platform

.NET 8.0

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issuequeueds3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions