Giter Club home page Giter Club logo

Comments (7)

michalkcloudinay avatar michalkcloudinay commented on June 20, 2024 1

Hi @ttanimichi, for 4-bytesize Unicode characters you would need to use a double encoding. For example:
https://res.cloudinary.com/demo/image/upload/o_30/l_text:Arial_58:%2520%25F0%25A9%25B8%25BD/couple.jpg
Let us know if this works for you.

from cloudinary_gem.

michalkcloudinay avatar michalkcloudinay commented on June 20, 2024

Hi @ttanimichi, including emojis in text overlays can be done by double encoding the emoji as explained here:https://support.cloudinary.com/hc/en-us/articles/360003457091-How-to-overlay-emojis-in-images. Please note that not all emojis are supported. You can refer here for the list of supported emojis: https://www.piliapp.com/symbol/

from cloudinary_gem.

ttanimichi avatar ttanimichi commented on June 20, 2024

@michalkcloudinay Thank you for your reply.
Not only emojis but also some kind of chinese characters seem to cause the same error.

foo('漢字') # Most of chinese characters are No Problem
foo('あいうえお') # Japanese Hiragana letters are also No Problem

foo('𩸽') # => 400 Bad Request (OpenURI::HTTPError)
foo('𡈽') # => 400 Bad Request (OpenURI::HTTPError)
foo('𠀋') # => 400 Bad Request (OpenURI::HTTPError)

I found that the bytesize of 🍺, 𩸽 (Unicode: U+29E3D), 𡈽 and 𠀋 are four.

$ irb
irb(main):001:0> '𩸽'.bytesize
=> 4
irb(main):002:0> '🍺'.bytesize
=> 4
irb(main):003:0> '𡈽'.bytesize
=> 4
irb(main):004:0> '𠀋'.bytesize
=> 4

Probably, overlay texts of 4-bytesize Unicode characters cause this error. Isn't it a bug of Cloudinary API, is it?

from cloudinary_gem.

ttanimichi avatar ttanimichi commented on June 20, 2024

One of my best friend Mr. 𡈽田 (Tsuchida) can't display his name as overlay texts since his family name contains 𡈽, which is a 4-bytesize Unicode character. It's so much trouble for him...

from cloudinary_gem.

ttanimichi avatar ttanimichi commented on June 20, 2024

@michalkcloudinay Thanks! I'll try it next week and let you know the result

from cloudinary_gem.

michalkcloudinay avatar michalkcloudinay commented on June 20, 2024

Great! Let us know how it goes.

from cloudinary_gem.

aleksandar-cloudinary avatar aleksandar-cloudinary commented on June 20, 2024

Hi @ttanimichi - just wanted to follow up on this to see if you had a chance to test this and if it worked for you?

from cloudinary_gem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.