Character encoding
I am using cloudinary to apply text to images however I am having a number of issues with character encodings.
Is their a node library you would recommend for using to achieve the character encoding you require or is there any documentation listing all the encoding that you use
Some example text I want to encode:
1 - GoT Quiz: 'The House of Black and White'
2 - Are you a Zombie?
3 - Cake, Pie or Fake?
So chars their that seem to be causing issues so far - ? , : '
Thanks for help
-
Note that while some characters have to be escaped for the sake of the browser, [/ and ,] must be double escaped for Cloudinary, as described here:
http://support.cloudinary.com/hc/en-us/articles/202521512-How-to-add-a-slash-character-in-text-overlays-You can use the following line of code where we double escape / and , and prepare the string to be inserted into the URL.
encodeURIComponent(string.replace(/\,/g, "%2C").replace(/\//g, "%2F"))
0
Post is closed for comments.
Comments
1 comment