react native encoding conversion

I'm trying to convert a fetch response from ISO-8859-1 to UTF-8 in react native. I found this answer : Encoding conversion of a fetch response but in react native i'm having some troubles...

I didn't manage to use iconv, i tryed :

npm install --save iconv-lite // success

then i do

var iconv = require('iconv-lite') // Error 500 from react native

I didn't manage to use Buffer, it is unknown by react native and

require('buffer').Buffer // Error 500 from react native

So here are my questions :

What is the best way to make an encoding conversion in react native ?
In case Encoding conversion of a fetch response is good: How do i use iconv ? How do i use Buffer ?

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

Chart JS +ng2-charts not working on Angular+2