How can we support special characters in react native base 64?
import base from 'react-native-base64'
....
base.encode(str)
....
str would be asdĞ or any other special characters from some languages.
I have used this package https://www.npmjs.com/package/react-native-base64
Currently while decoding it converting the string to asd
Here is the example code
import React from "react";
import { View, Text } from "react-native";
import base from "react-native-base64";
const Decode = () => {
const string = "asdĞ";
const encode = base.encode(string);
const decode = base.decode(encode);
return (
<View>
<Text>{"String = " + string}</Text>
<Text>{"DecodeS = " + decode}</Text>
</View>
);
};
export default Decode;
you can try it on https://codesandbox.io/s/aged-currying-te3ki4?file=/src/Decode.js