Using special characters in Text overlaying (',') ?
How can we include special characters, like the** ',' comma** ? Tried replacing commas will Url Encoded characters (%2C), still no luck.
Below is the link that I have building on... Please refers the attach image to see the expected output ....
Thank You.
-
The issue with the comma is that it collides with Cloudinary's functionality. Specifically commas in Cloudinary URLs are used for separating between different transformation parameters (e.g.,
w_100,h_100
)
So if the regular comma (or even its%2C
escaped version) is used, Cloudinary will think that the next parameter is entered rather than the rest of the text string.
Therefore, you can either double escape the comma character (e.g.,%252C
):
http://res.cloudinary.com/dy3pxdqun/image/fetch/w_1.0/l_black_box_corbn7,g_south_west,w_220,h_110,o_60/l_text:Ubuntu_65_bold:Run%252CJump,g_south_west,co_white,w_210,h_100,x_5,y_5,c_pad/http://upload.wikimedia.org/wikipedia/commons/2/26/YellowLabradorLooking_new.jpgOr, you can use a special encoding of a different type of the comma character (
%E2%80%9A
): -
You can use something like:
$.cloudinary.image("my_image.jpg", { overlay: "text:Arial_24:hello+Welcome", gravity: 'north' });
Here's our jQuery documentation regarding generating text overlays:
http://cloudinary.com/documentation/jquery_image_manipulation#text_layersFor more information about text overlays with Cloudinary:
http://cloudinary.com/cookbook/add_a_text_to_an_image -
It's mostly commas and slashes.
For more information:
https://support.cloudinary.com/hc/en-us/articles/202521512-How-to-add-a-slash-character-or-any-other-special-characters-in-text-overlays- -
You can escape it. For example:
https://res.cloudinary.com/demo/image/upload/l_text:arial_20:Here%20you%20go:%20%C3%87%3F/sample.jpg
Post is closed for comments.
Comments
8 comments