petersolopov / carbonara

API for carbon
MIT License
125 stars 32 forks source link

it look like can not support Chinese #18

Closed KakaWanYifan closed 3 years ago

KakaWanYifan commented 3 years ago

just like {"code":"中文"}

but I got

[h2dYa4.png]

petersolopov commented 3 years ago

I added support of Chinese language for docker container petersolopov/carbonara.

But endpoint POST carbonara.vercel.app/api/cook works inside Vercel Serverless Functions. I can't change runtime there. And it don't support docker deployment.

tangpanqing commented 3 years ago

thanks for your job @petersolopov

i got the same err about chinese str

would you change POST carbonara.vercel.app/api/cook runtime env ?

just a wish

New-dev0 commented 3 years ago

Hello @petersolopov, even emojis are not supported by the api And same boxes appeared in their place. Even carbon.now.sh supports emoji(s), in images.

Want to ask, can carbonara support emoji(s) too please?.

petersolopov commented 3 years ago

Hi! Yeah, it is the same problem.

I'll try to find other PaaS or hosting with fully Unicode supporting.

petersolopov commented 3 years ago

I found that heroku supports docker deployment. Try new endpoint. Now It should work with Chinese and Emoji:

curl -L https://carbonara-42.herokuapp.com/api/cook \
-X POST \
-H 'Content-Type: application/json' \
-d '{
      "code": "中文 😀",                  
      "backgroundColor": "#1F816D"
    }' \
> code.png

image

The old endpoint continue working with new updates but limited unicode support. Feel free to reopen issue.