UTF-unknown icon indicating copy to clipboard operation
UTF-unknown copied to clipboard

Detect encoding from string?

Open foxi69 opened this issue 1 year ago • 2 comments

Can i get proper encoding from text like this? "Español"

foxi69 avatar Jan 29 '24 18:01 foxi69

Well the encoding in a string is always UTF 16.

.NET uses UTF-16 to encode the text in a string. A char instance represents a 16-bit code unit.

From https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-encoding-introduction

304NotModified avatar Jan 30 '24 16:01 304NotModified

Okay, and can I convert this to the correct character set? It could be "Español"

Btw it came from Xabe.FFmpeg SubtitleStream.Title prop.

foxi69 avatar Feb 01 '24 10:02 foxi69