Posts

Showing posts with the label encoding

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 ?