4

It has already been discussed on the general site meta at Whitelist the <span> tag with the lang= attribute, in order to support Han characters, but I'd like to draw attention to it again here at JSE, given that we are the site most affected by this.

Lately there have been a few questions asking about variant character forms. This is only natural, given the divergence of Chinese and Japanese simplification schemes, all thrown together with other regions not simplifying their Chinese characters (hk, tw). Even so, it makes it incredibly difficult to answer these questions, because JSE only has proper support for Shinjitai in unicode. This means that when I try to type 直, no matter what I do, it comes out with an L shape, even if I want to show the form with a flat bottom line.

More ridiculously, these characters turn up in their Chinese form in the title (but ONLY in edit mode) and URL bars. While I'm aware that the latter can't be helped, character forms in titles is definitely within our capacity as a website to change. In fact, to add to this, if I make a heading or use sub/superscript, 直 comes out...


as 直


The important thing for our site is

(1) The ability to properly display Japanese characters

(2) To show variant character forms

Currently, characters often come out in their Chinese form, as shown above, meaning that the site isn't able to display Japanese as a Japanese language site (this means we haven't achieved (1)), and we also can't show variant forms used in unicode so that we can answer people's questions about why characters look different in URLs and elsewhere on the internet (meaning we haven't achieved (2)).

The simplest way to approach this is to allow this using the < span > tag, so that we can write

<span lang="zh">隆</span>
<span lang="ja">隆</span>

and get display two different characters (that share a unicode codepoint), one for each language.

This is an essential feature for JSE. In its current state, it doesn't properly show Japanese characters in titles and scripts, while equally it can't show variant characters to answer questions from people wondering about encoding and typing, calligraphy, handwriting, and printing of these variants.

Questions that have asked about variant forms (I think these shed light on the necessity of this feature):

1 Answer 1

2

The Furigana engine currently encloses Japanese text (aside from in <input>, <textarea> and <title> tags, as you have noted) in <span lang="ja"> tags. I could add lang='ja' attributes to <input>/<textarea> tags in the engine.

It would be possible for me to add some sort of markup (like {{zh:...}}) the Furigana engine could use to convert to Chinese etc, but if you want to allow <span lang="zh"> the Stack Exchange people would need to do that as I can't change things server-side.

3
  • Adding the lang="ja" attrib to <input> and <textarea> would be really helpful. I'm not fully sure how to deal with the language displaying issue. Furigana is one option, but it doesn't fully help if you want to display certain forms within Chinese, for example. It would solve 99% of cases to work like this, so in practice it's a near-perfect solution, even though in theoryI think the only way to fix it for the other 1% would be server-side, as you said. If you could add anything, I'd be really grateful, and your solutions work just fine! Thanks!
    – sqrtbottle
    Commented Dec 13, 2015 at 22:05
  • @cypher Is this [status-completed]?
    – Earthliŋ Mod
    Commented Apr 23, 2016 at 19:22
  • 1
    @Earthliŋ yes it is, see also meta.japanese.stackexchange.com/a/1502/796
    – cypher
    Commented Apr 24, 2016 at 9:58

You must log in to answer this question.

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