Twitter product cards not working with Japanese text in URL?


#1

What is the answer to this? The Product Card validates just fine with the validator and it is approved already. Tweeting the URL unlinks any Japanese text in the URL and fetches data from a different product.

When I use the encoded URL it works.

This URL will not work:
http://jp.ninafurfur.com/product/chanel-デカマトラッセ/

This one will:
http://jp.ninafurfur.com/product/chanel-デカマトラッセ/

Why can’t twitter just do the encoding/decoding like everything else on the web?


#2

Having to do this often goes over the character limit of the tweet.


#3

None of the other URLs are being validated?


#4

You can’t enter directly http://jp.ninafurfur.com/product/chanel-デカマトラッセ/ because in Japanese many people are not putting spaces between URLs and the rest of the text. If we allowed Japanese characters in URL paths, “http://example.com/testはおもしろいページだ” would be considered to be one long URL instead of a URL + some text. So you have to use the escaped version of the URL.

You say using the escaped version of the URL goes over the character limit of the tweet but it doesn’t. Any URL only takes 22 or 23 characters (22 for http, 23 for https) from the 140 characters limit, whatever the URL’s length.

To compute the real length of a tweet, you can use for example one of the twitter-text libraries:





They all allow you to get a tweet’s length or to check if a tweet is invalid or not.