G
G
godsplane2022-04-01 15:07:44
HTML
godsplane, 2022-04-01 15:07:44

Is it possible to use the Cyrillic alphabet in data attributes or somewhere else?

I'm interested in Cyrillic support for date attributes or somewhere else (For example, classes)
I'm not going to use it in classes, but I would like to use it in date attributes, + it's just as interesting whether spaces in date attributes behave normally.
That is, can I use something like this data-name="Hello world"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2022-04-01
@godsplane

If the value is both spaces and Cyrillic characters - why not? Why shouldn't this be supported? The text in Cyrillic is supported. A Cyrillic string is still the same string, only with a different character set.
But as keys or attribute names, I would not risk it. If, of course, this is some kind of pet project only for itself and it works, then it’s still acceptable, but I wouldn’t roll it out for sale. Different operating systems, different browsers, a slightly different approach to encoding/decoding Cyrillic characters, and so on and so forth. Well, in general, there is a spec that regulates which symbols can be used where. Well, at least this can be said to be an antipattern.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question