61
Views
4
Comments
How to convert base64 text to binary data with Windows-1252 encode

Hello everyone,

I'm trying to convert text encoded with Windows-1252 character encoding into binary data. However, the textToBinary function doesn't seem to accept the Windows-1252 encoding. Can anyone suggest an alternative method or workaround for this?



2024-03-22 09-17-23
Chandra Vikas Sharma

hi pier,

you can use below forge component. i supported Windows-1252 encode.

https://www.outsystems.com/forge/component-overview/5599/charset-detector-o11


thanks

cv



2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Chandra,

That components seem to detect only, not convert.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Pier,

There's no out-of-the-box solution. There's this Forge asset, but that's for ISO-8859-1, which is similar to Windows 1252, but has a difference in characters 128-159. If that's no problem for your text you might give it a try.

2019-01-07 16-04-16
Siya
 
MVP

Looking at the source code of BinaryData extension I can see it does support Windows-1252 encoding.

Please find attached the oml which does encoding using Windows-1252 and convert back and also detects the correct encoding (using the forge component mentioned by @Chandra Vikas ) . btw @Pier Paolo Annis  what issue you are facing while encoding ? 

Windows1252encode.oml
TextFileEncoding_v2.xif
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.