11

I tried to construct a link like this: [goo](http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/いい/) and it caused the Markdown parser to produce goo, which (if you're reading this in the future) is not actually a link, just the word goo.

I was able to fix it by URI-escaping the いい like so: [goo](http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/%3044%3044/) which produces the correct goo.

but it'd be great if the parser could characters outside ASCII, since Japanese is going to be using a lot of them! Not to mention, I doubt most nonprogrammers would be able to reuse this kind of fix.

1

4 Answers 4

9

If you use link icon on the markdown toolbar, it will automatically URL escaped for you

http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/いい/

source of markdown for above is:

[http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/いい/][1]    

  [1]: http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/%E3%81%84%E3%81%84/
3

Fixing hyperlinks with Japanese characters is currently on the Japanese stackoverflow.

https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される

I suggest/request we apply what they come up on our site as well.


Markdown links:

https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される

[https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される](https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される)

Plain text links:

https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される

https://ja.meta.stackoverflow.com/questions/255/so内のページのurlを書くと-日本語部分が2回表示される
1

One problem with this is there's no way to know the proper encoding of the URL this way. Generally browsers guess based on the page encoding you're linked from, but on stackexchange sites this would be forced to UTF-8. I'm not sure how popular SJIS and EUC-JP are on Japanese site URLs these days, but they're definitely still used for body text.

Incidentally, that URL you wrote is not actually a correct encoding - it just happens to work because the page ignores that component of the URL. The correct encoding (assuming UTF-8) would be http://dictionary.goo.ne.jp/leaf/jn2/9174/m0u/%E3%81%84%E3%81%84/ .

0

Various experiments:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .