Skip to content

uplink(fix): Fix reading non-ASCII custom metadata - #107

Open
GodTamIt wants to merge 1 commit into
storj-thirdparty:mainfrom
GodTamIt:fix-custom-metadata-utf8
Open

GodTamIt wants to merge 1 commit into
storj-thirdparty:mainfrom
GodTamIt:fix-custom-metadata-utf8

Conversation

@GodTamIt

Copy link
Copy Markdown
Contributor

Custom metadata was being read by casting each byte to a char, so anything that isn't ASCII came back garbled (é turns into é). The stored metadata is fine, it's only reading it that was broken.

Invalid UTF-8 is now replaced with U+FFFD.

Each byte of the keys and values returned by the FFI was converted to a
character, so any key or value with a non-ASCII character was corrupted,
despite it was correctly stored.
@sonarqubecloud

Copy link
Copy Markdown

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

Successfully merging this pull request may close these issues.

1 participant