S3 Objects and Encoding

Asked 1 years ago, Updated 1 years ago, 90 views

Text files are shaped in the following order:

3. When putting to S3 in , the put parameter has the following:
When I checked the put file on the S3 console, I could see that the metadata was set to each one.

contentType="text/plain";
contentEncoding="UTF-8";

However, when I downloaded this file and checked it in the Sakura editor, it said SJIS instead of UTF-8.

How can I make it into a UTF-8 file?
Thank you for your cooperation.

aws amazon-s3 aws-lambda

2022-09-30 19:10

2 Answers

If the original text is written in SJIS and you don't have lambda and you haven't done any character code conversion, the text will remain SJIS.
No matter how much you rewrite the meta data, it does not affect the contents.


2022-09-30 19:10

Why don't you use iconv-lite to convert the character code?


2022-09-30 19:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.