Jump to content

Module talk:Unicode data

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DePiep (talk | contribs) at 05:17, 27 March 2022 (is_pagename: what is "pagename" in unicode context?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

About RTL

I am researching RTL scripts. I met this:

  • A
0xa9 -- LATIN CAPITAL LETTER A
Latn
is_rtl: false
  • ث
0x062B -- ARABIC LETTER THEH [1]
Arab
is_rtl: false
  • ש
0x05E9 -- HEBREW LETTER SHIN [2]
Hebr
is_rtl: false


  • ߖ
0x07D6 -- NKO LETTER JA [3]
Nkoo
is_rtl: false

I'd expect the Arab, Hebr, Nkoo characters to be rtl=true. Am I misunderstanding something? @Erutuon: -DePiep (talk) 20:58, 9 January 2021 (UTC)[reply]

@DePiep: The invocation {{#invoke:Unicode data|is|rtl|05E9}} checks whether the literal characters 05E9 are right-to-left. To check the right-to-leftness of the Hebrew character, put in the literal character or a HTML character reference: {{#invoke:Unicode data|is|rtl|ש}} or {{#invoke:Unicode data|is|rtl|ש}}. #invoke:Unicode data|is|rtl as well as #invoke:Unicode data|is|valid_pagename and #invoke:Unicode data|is|Latin interpret their arguments as strings rather than code points in hexadecimal because the corresponding functions in the module take strings. (They could take hexadecimal arguments if someone edited the module to add another parameter to tell them to interpret their argument this way.) — Eru·tuon 01:02, 10 January 2021 (UTC)[reply]
@Erutuon: Thanks, will work for me. Great module! (Second code example is {{#invoke:Unicode data|is|rtl|ש}}). -DePiep (talk) 17:28, 10 January 2021 (UTC)[reply]
  • The four characters, is_rtl:
using &#x...; false
using &#x...; true
using &#x...; true
using &#x...; true
-DePiep (talk) 20:23, 10 January 2021 (UTC)[reply]

is_pagename

In the function is_pagename, does "pagename" stand for "blockname"? Or wider? -DePiep (talk) 05:17, 27 March 2022 (UTC)[reply]