I apologize in advance for sounding ignorant when I ask this question, but I'm not very good at conceptualizing the concept of encoding and decoding data.
As an example, I have access to a MIME encoded text with the following value:
=?GBK?B?xqw=?=
I know that (or pretty sure I know that) it's encoded using GB2312. Translated using online decoders tells me it's the word "sheet" in English. Is there a way to decode this into even its source language characters that I can even put into a 3rd party translator to read it in English from PowerShell? I feel like an idiot for asking this question because I'm not even sure I'm asking it in an intelligent way due to my general lack of understanding of all the core pieces involved.
I've tried looking through the Encoding class, but it doesn't have anything from what I can tell that will support this type. Are there any other modules or something available that I'm not aware of that can facilitate this?
Thank you for any assistance someone may provide and appreciate being schooled on this topic.
Easiest way is by using either System.Web.HttpUtility.UrlDecode
or System.Net.Mail.Attachment
class in Microsoft framework. With the later you can do:
$unicodeString = "=?GBK?B?xqw=?="
$attachment = [System.Net.Mail.Attachment]::CreateAttachmentFromString("", $unicodeString)
Write-Host $attachment.Name
It prints 片 that is "sheet" in Chinese, according to Google Translate.