Dynamic encode and convertion to UTF-8

Post Reply
abrdeco2
Posts: 4
Joined: Tue Jan 18, 2022 11:02 pm

Dynamic encode and convertion to UTF-8

Post by abrdeco2 »

Hello.

I´m currently stuck dealing with different encodings received.

Anyone can help with some snippet to identify the current encode and correctly convert to UTF-8 to permit store in a database ?

Thankyou,
André
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: Dynamic encode and convertion to UTF-8

Post by alt »

Hello,

Inetlab.SMPP library provides two extension methods CanBeDecoded, CanBeEncoded

https://docs.inetlab.com/smpp/v2.9/api/ ... sions.html

With these methods you can check if text can be encoded with specified encoding or if the byte array can be decoded with the encoding.
Post Reply