dimkr / tootik

A federated nanoblogging service with a Gemini frontend.
gemini://hd.206267.xyz
Apache License 2.0
107 stars 4 forks source link

render punycode domain names as unicode #39

Open norayr opened 8 months ago

norayr commented 8 months ago

can you render punycode domain names as unicode?

let's say here gemini://hd.206267.xyz/outbox/688041bb1d1eeccf2fd4705b5859a1a6557a6f313713240dfda5630f70a6fde3

or maybe even mentioned users gemini://hd.206267.xyz/view/78ebe1c4622578a946d753b46279b2f4dd1e8eb2eda5ae435a06e3236d2bd640

dimkr commented 8 months ago

I'm not sure if it's a good idea. Mentions use the punicode domain, right? If a@b looks at the profile of c@d and wants to mention c@d in a post, a needs to encode d first.

norayr commented 8 months ago

i don't know how tootik receives the message via federation, but in mastodon, everything is done in unicode, not punycode, by the user.

i. e. in order to mention someone, unicode domain name is used in mastodon.

also on mastodon when you see the user@domain somewhere, you see it rendered with unicode, no punycode presented to the user.

dimkr commented 8 months ago

I see, there's some JavaScript magic going on that replaces the punycode representation you're using to @mention someone with the Unicode representation. Need to think about this, because this behavior can't be translated to Gemini 1:1.