Answer the question
In order to leave comments, you need to log in
JavaScript: convert string to byte array?
Actually, the task was to convert images to Base64 on the client side. It was decided to get the picture itself via XmlHttpRequest with responseType = 'arraybuffer'. And it would be all right if XmlHttpRequest 2 was implemented in IE and other ancient browsers.
So far, I can get the picture as a string, and it already needs to be converted to an array of bytes. Can anyone help? Everything I found is applicable only for strings containing only printable characters.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question