qs是什么| 体香是什么味道| 黥面是什么意思| 白萝卜不能和什么一起吃| 夏天手上长小水泡是什么原因| 孕妇能喝什么茶| 未见明显胚芽是什么意思| 头不由自主的摇晃是什么病| 川字五行属什么| 胃不好能吃什么水果| 输卵管堵塞是什么原因| 生日可以送什么礼物| dvd是什么意思| 掉头发是什么原因女性| 女生生日送什么礼物好| 是什么原因导致肥胖| 吃什么能升血压| 鼻毛变白是什么原因| 牟作为姓氏时读什么| 嗜酸性粒细胞偏低是什么原因| 西洋参可以和什么一起泡水喝| 胃绞疼是什么原因| array是什么意思| 六月十二日是什么日子| 血压高是什么引起的| 左脸长痣代表什么| 吃羊肉不能吃什么水果| 朱日和是什么意思| 辟谣是什么意思| 冲羊煞东是什么意思| 寄居蟹用什么水养| 1978年属马五行属什么| 木糖醇是什么东西| 霉点用什么可以洗掉| 甲状腺腺体回声欠均匀是什么意思| 草长莺飞是什么生肖| 三点水加一个心读什么| 与时俱进是什么意思| 制动什么意思| 囊是什么意思| 几朵花代表什么意思| 打日本电话前面加什么| 一年四季都盛开的花是什么花| 淋巴细胞偏高是什么原因| 我们都没错只是不适合是什么歌| 朗格手表什么档次| 金牛座与什么星座最配| 白凉粉是什么东西| 囊性回声是什么意思| 补充电解质是什么意思| 阳性体征是什么意思| 痔疮是什么科室看的| 为什么会甲状腺肿大| 切尔西是什么意思| 更年期吃什么药调理| 组织细胞是什么| 下雨为什么会打雷闪电| 白俄罗斯和俄罗斯有什么区别| 摇曳是什么意思| 嘴里起血泡是什么原因| 世界上最大的湖泊是什么湖| 鲁迅真名叫什么| 偶数是什么| 吃什么补黑色素最快| 太平果是什么水果| 江西有什么好玩的地方| 梦见大便是什么意思| 虾膏是什么| 自尊心是什么意思| 暗合是什么意思| 自由意志是什么意思| 直是什么意思| 化肥对人体有什么危害| 经常感冒的人吃什么能增强抵抗力| 腿上无缘无故出现淤青是什么原因| 生冷辛辣指的是什么| 什么人容易得梦游症| 身体缺钾吃什么可以补充| 130是什么意思| 5岁属什么生肖| 绷不住了是什么意思| 男人第一次什么 感觉| 女性支原体阳性是什么意思| 惊弓之鸟是什么意思| 什么样的痣需要切除| 颜艺是什么意思| 脂肪肝浸润是什么意思| 肾囊肿有什么危害| pass是什么意思| 胃角在什么位置图片| xyz是什么意思| 男性内分泌失调吃什么药| 财主代表什么生肖| 特需门诊和专家门诊有什么区别| 月经前乳房胀痛是什么原因| 鸡五行属什么| 8月26号是什么星座| 烤冷面是什么做的| 锦鲤可以和什么鱼混养| 脚踝浮肿是什么原因引起的| 夏天脚冷是什么原因| 五四运动的精神是什么| 正常大便是什么颜色| 狗什么东西不能吃| 眼睛肿什么原因| 知性是什么类型的女人| 东南方五行属什么| 为什么会宫颈糜烂| 玉兰花什么季节开| 安娜苏香水什么档次| 黄芪和枸杞泡水喝有什么作用| 胆结石挂什么科| 奇异果是什么水果| 荷叶泡水喝有什么作用| 32周做什么检查| 甘甜的什么| npv是什么意思| 闰六月给父母买什么| 芋圆用什么粉做的| 盆腔为什么有积液| 干燥综合症是什么病| apc是什么意思| 途径是什么意思| 蜂蜜芥末酱是什么味道| 什么属相不能带狗牙| 血管是什么颜色的| 公开遴选公务员是什么意思| 慢阻肺吃什么药最有效最好| 什么叫钙化灶| 套马的汉子你威武雄壮是什么歌| 内裤发霉是什么原因| 脚背麻木是什么原因| 高中校长什么级别| 补充蛋白质提高免疫力吃什么| 喉咙痛买什么药| 总有眼屎是什么原因| 甲状腺有血流信号是什么意思| 尿常规3个加号什么意思| 唇炎抹什么药膏最有效| 后背疼痛挂什么科| 鸡吃什么食物| 什么钙片补钙效果好| 减肥的原理是什么| 什么护肤产品补水最好| uno是什么| 淋巴发炎吃什么药| 孕期血糖高有什么症状| 胆囊壁不光滑是什么意思| 第二视角是什么意思| 为什么越吃越饿| 花魁是什么意思| 肩膀疼是什么原因引起的| 舌头上有红点是什么原因| 吹空调咳嗽吃什么药| mcv偏低是什么意思| 这是什么| 急性肠胃炎吃什么食物| 为什么会有头皮屑| 外婆的妈妈叫什么| 什么猪没有嘴| 胰腺在人体什么位置| 正处级是什么级别| 护士长是什么级别| 隐士是什么意思| 2008是什么年| 梅毒吃什么药最好| 6月13日什么星座| 人乳头瘤病毒是什么意思| 降结肠疼是什么原因| 每天跑步对身体有什么好处| 头疼嗓子疼吃什么药| 吃什么养胃又补胃| 低压高吃什么中成药| 2024年是什么年| 电导率是什么意思| asus是什么牌子| 一月10号是什么星座| 河北有什么特产| 装可以组什么词| 寄什么快递最便宜| 东字五行属什么| 梦见过年是什么意思| 臭屁是什么意思| 夏侯霸为什么投降蜀国| 肺结节挂什么科室| 新鲜的乌梅长什么样| 拿什么拯救你我的爱人演员表| 宥怎么读什么意思| 天方夜谭是什么生肖| 潘字五行属什么| 产妇吃什么水果| 为什么合欢树又叫鬼树| 牙膏什么牌子最好| 家里为什么突然有床虱| 智齿不拔有什么危害| 银杏叶片治什么病| 11点到12点是什么时辰| 驴板肠是什么部位| 毛泽东女儿为什么姓李| 尾骨疼是什么原因| 尿道口灼热感吃什么药最快| 吃石斛有什么作用| 流产的血是什么颜色| 红花和藏红花有什么区别| 飞蚊症是什么原因造成的能治愈吗| 天干是什么意思| 方阵是什么意思| 白马王子是什么意思| 盐酸左氧氟沙星片治什么病| 舌头白色是什么原因| 肝在五行中属什么| 痔疮吃什么食物| 乳腺4a类是什么意思| 巧囊是什么原因形成的| vivo什么牌子| 恩裳是什么档次的衣服| 去除扁平疣用什么药膏| 燕窝是什么| 吃什么升血小板快| 皮肤黑的人穿什么颜色的衣服好看| 胸痛吃什么药| 什么是abs| 手机壳为什么会发黄| 新生儿老打嗝什么原因| 金钱草有什么功效| 坛城是什么意思| 玄武岩属于什么岩石| 粿是什么意思| 甲状腺亢进是什么意思| perry是什么意思| ufo是什么意思| 竖心旁的字有什么| 刺身是什么鱼| 葛根泡水有什么功效| 女人什么身材最好看| 什么的高| 什么是苔藓皮肤病| 蜂蜜什么时候喝最好| 5月14日什么星座| 湿疹挂什么科| 三月二十三是什么星座| 流浓黄鼻涕是什么原因| 胃手术后吃什么好| 大腿肌肉酸痛是什么病| 结婚需要准备什么| 肝气郁结吃什么药| 玉屏风治什么病最好| 双肾囊肿什么意思| 真心话大冒险问什么| 金玉良缘什么意思| 怀孕可以吃什么| 尿结石有什么症状| 头出汗多是什么原因| 橄榄色是什么颜色| 抑制素b检测是什么意思| 多吃青菜有什么好处| 内分泌失调看什么科| 熊是什么生肖| 浮想联翩什么意思| 人造石是什么材料做的| 国家发改委主任什么级别| 舌头有问题应该挂什么科| 梦见穿袜子是什么意思| 成都是什么气候| 百度Zum Inhalt springen

关于做好2017年重点高校招收农村和贫困地区...

aus Wikipedia, der freien Enzyklop?die
Vorlagenprogrammierung Diskussionen Lua Test Unterseiten
Modul Deutsch English 百度 “小候鸟牵手成长”活动、“千场电影进企业、百场文艺下基层”、“杭州职工大学堂”、“工会乐活文化”、“幸福大牵手”、外来务工人员“平安返乡”行动,一场场筹备有序、组织周密的工会活动背后,都体现了杭州这座城市对农民工的关爱和关怀。

Modul: Dokumentation

Diese Seite enth?lt Code in der Programmiersprache Lua. Einbindungszahl Cirrus

Dies ist die (produktive) Mutterversion eines global benutzten Lua-Moduls.
Wenn die serial-Information nicht übereinstimmt, müsste eine Kopie hiervon in das lokale Wiki geschrieben werden.
Versionsbezeichnung auf WikiData: 2025-08-07

local ISO15924 = { suite   = "ISO15924",
                   serial  = "2025-08-07",
                   item    = 71584769,
                   statics = "codes" }
--[=[
ISO 15924 support for scripting systems
* fetch()
* getLanguageScript()
* getScripts()
* isCJK()
* isRTL()
* isScript()
* isTrans()
* scriptName()
* showScript()
* showScripts()
* testScripts()
* failsafe()
]=]
local Failsafe  = ISO15924
local GlobalMod = ISO15924
local Unicode



ISO15924.Text    = { }
ISO15924.Unicode = { }
Unicode = ISO15924.Unicode
Unicode.RomanN = { bef = {   [ 32 ] = true,
                            [ 160 ] = true,
                           [ 8239 ] = true,
                             [ 40 ] = true,
                             [ 45 ] = true,
                             [ 91 ] = true
                         },
                   dig = { [ 73 ] = true,    -- I
                           [ 86 ] = true,    -- V
                           [ 88 ] = true,    -- X
                           [ 76 ] = true,    -- L
                           [ 67 ] = true,    -- C
                           [ 68 ] = true,    -- D
                           [ 77 ] = true     -- M
                         },
                   fol = {   [ 32 ] = true,
                            [ 160 ] = true,
                           [ 8239 ] = true,
                             [ 41 ] = true,
                             [ 44 ] = true,
                             [ 46 ] = true,
                             [ 93 ] = true
                         } }
ISO15924.Commons = { "cjk",
                     "iso639script",
                     "reverse",
                     "rtl",
                     "trans",
                     "unicodes" }



local foreignModule = function ( access, advanced, append, alt, alert )
    -- Fetch global module
    -- Precondition:
    --     access    -- string, with name of base module
    --     advanced  -- true, for require(); else mw.loadData()
    --     append    -- string, with subpage part, if any; or false
    --     alt       -- number, of wikidata item of root; or false
    --     alert     -- true, for throwing error on data problem
    -- Postcondition:
    --     Returns whatever, probably table
    -- 2025-08-07
    local storage = access
    local finer = function ()
                      if append then
                          storage = string.format( "%s/%s",
                                                   storage,
                                                   append )
                      end
                  end
    local fun, lucky, r, suited
    if advanced then
        fun = require
    else
        fun = mw.loadData
    end
    GlobalMod.globalModules = GlobalMod.globalModules or { }
    suited = GlobalMod.globalModules[ access ]
    if not suited then
        finer()
        lucky, r = pcall( fun,  "Module:" .. storage )
    end
    if not lucky then
        if not suited  and
           type( alt ) == "number"  and
           alt > 0 then
            suited = string.format( "Q%d", alt )
            suited = mw.wikibase.getSitelink( suited )
            GlobalMod.globalModules[ access ] = suited or true
        end
        if type( suited ) == "string" then
            storage = suited
            finer()
            lucky, r = pcall( fun, storage )
        end
        if not lucky and alert then
            error( "Missing or invalid page: " .. storage, 0 )
        end
    end
    return r
end -- foreignModule()



local function fill( accumulate, assign, append )
    -- Copy external sequence into local collection
    -- Precondition:
    --     accumulate  -- table, with relevant definitions
    --     assign      -- table, with assigned definitions
    --     append      -- table, if code names to be appended to entries
    if type( assign ) == "table" then
        local e
        for k, v in pairs( assign ) do
            if type( v ) == "table" then
                e = { }
                for kk, vv in pairs( v ) do
                    table.insert( e, vv )
                end -- for kk, vv
                if append then
                     for i = 1, #append do
                        table.insert( e, append[ i ] )
                    end -- for i
                end
                table.insert( accumulate, e )
            end
        end -- for k, v
    end
end -- fill()



local function fulfil( ask, attribute )
    -- Check whether script has a certain attribute
    -- Precondition:
    --     ask  -- string, with language or script code
    --     attribute  -- string, with "cjk" or "rtl"
    -- Returns true, if matchin
    local got = ISO15924.fetch( attribute )
    local r
    if type( got ) == "table" then
        local n = #ask
        local script
        if n == 4 then
            script = ask
        elseif n < 4 then
            script = ISO15924.getLanguageScript( ask )
        else
            script = ask:match( "^%a%a%a?%-(%a%a%a%a)$" )
            if not script then
                script = ask:match( "^(%a%a%a?)%-%a%a$" )
                script = ISO15924.getLanguageScript( script )
            end
        end
        if script then
            script = script:sub( 1, 1 ):upper() ..
                     script:sub( 2 ):lower()
            r = got[ script ]
        end
    end
    return r or false
end -- fulfil()



ISO15924.Text.scriptName = function ( assigned, alien, add )
    -- Retrieve script name, hopefully linked
    -- Precondition:
    --     assigned  -- string, with script code
    --     alien     -- string, with language code, or not
    --     add       -- arbitrary additional information
    -- Returns string
    local r, trsl
    if type( assigned ) == "string"  and
       assigned:match( "^%u%l%l%l$" ) then
        trsl = ISO15924.fetch( "translate" )
        r    = assigned
    else
        r = ""
    end
    if type( trsl ) == "table" then
        local slang
        if type( alien ) == "string"  and
           alien:match( "^%l%l%l?%-?" ) then
            slang = alien:lower()
        end
        if not slang then
            if not ISO15924.Text.sublang then
                local title = mw.title.getCurrentTitle()
                ISO15924.Text.sublang = title.text:match( "/%l%l%l?$" )
                ISO15924.Text.sublang = ISO15924.Text.sublang or true
            end
            if type( ISO15924.Text.sublang ) == "string"  and
               type( trsl[ ISO15924.Text.sublang ] ) == "table" then
                slang = ISO15924.Text.sublang
            end
        end
        if not slang then
            if not ISO15924.Text.sitelang then
                local contLang = mw.language.getContentLanguage()
                ISO15924.Text.sitelang = contLang:getCode():lower()
            end
            slang = ISO15924.Text.sitelang
        end
        if type( trsl[ slang ] ) == "table" then
            trsl = trsl[ slang ]
        elseif type( trsl.en ) == "table" then
            trsl  = trsl.en
            slang = "en"
        else
            trsl = false
        end
        if trsl then
            local pages = ISO15924.fetch( "pages" )
            trsl = trsl[ assigned ]
            if type( trsl ) == "string" then
                r = trsl
            elseif type( trsl ) == "table" then
                if type( trsl[ 1 ] ) == "string" then
                    r = trsl[ 1 ]
                    if add  and  slang == "de" then
                        if tonumber( add ) == 2  and
                           type( trsl[ 2 ] ) == "string" then
                            r = trsl[ 2 ]
                        end
                    end
                end
            end
            if type( pages ) == "table" then
                local p
                for k, v in pairs( pages ) do
                    if type( v ) == "table"  and  v.lang == slang then
                        p = v
                        break    -- for k, v
                    end
                end -- for k, v
                if p  and  type( p.targets ) == "table" then
                    p = p.targets[ assigned ]
                    if type( p ) == "string" then
                        -- different server issues --
                        if mw.ustring.upper( mw.ustring.sub( p, 1, 1 ) )
                           ~=
                           mw.ustring.upper( mw.ustring.sub( r, 1, 1 ) )
                           or  mw.ustring.sub( p, 2 ) ~=
                               mw.ustring.sub( r, 2 ) then
                            r = string.format( "%s|%s", p, r )
                        end
                        r = string.format( "[[%s]]", r )
                    end
                end
            end
            if add  and  slang == "de" then
                if tonumber( add ) == 2 then
                    local s = "in "
                    if type( trsl ) == "table" and
                       type( trsl[ 3 ] ) == "string" then
                        s = trsl[ 3 ] .. " "
                    end
                    r = s .. r
                end
            end
        end
    end
    return r
end -- ISO15924.Text.scriptName()



Unicode.flat = function ( analyse )
    -- Remove markup and syntax from wikitext
    -- Precondition:
    --     analyse  -- string, with wikitext
    -- Returns string, with cleaned content plain text
    local r = analyse
    if r:find( "&", 1, true ) then
        r = mw.text.decode( r, true )
    end
    r = mw.text.trim( mw.text.unstrip( r ) )
    if r:find( "<", 1, true )  and
       r:find( ">", 1, true ) then
        r = r:gsub( "(</?%l[^>]*>)", "" )
    end
    if r:find( "[", 1, true )    and
       ( ( r:find( "[[", 1, true )  and
           r:find( "]]", 1, true ) )   or
         r:find( "[http", 1, true )   or
         r:find( "[//", 1, true ) ) then
        local lucky, WLink = pcall( require, "Module:WLink" )
        if type( WLink ) == "table" then
            r = WLink.WLink().getPlain( r )
        end
    end
    return r
end -- Unicode.flat()



Unicode.getRanges = function ()
    -- Retrieve collection of Unicode ranges
    -- Returns table, with all relations codepoint / scripts
    if type( Unicode.ranges ) ~= "table" then
        local e, unique
        Unicode.ranges = { }
        unique = ISO15924.fetch( "reverse" )
        for k, range in pairs( unique ) do
            e = { }
            for j, v in pairs( range ) do
                table.insert( e, v )
            end -- for j, v
            table.insert( Unicode.ranges, e )
        end -- for k, range
    end
    return Unicode.ranges
end -- Unicode.getRanges()



Unicode.getScripts = function ( allow, analyse, assume )
    -- Check all chars for expected script code ranges
    -- Precondition:
    --     allow    -- table, with permitted unspecific ranges
    --     analyse  -- string or number or table, with text
    --     assume   -- string, or nil, with ID of expected script
    -- Returns table, with all relations codepoint / scripts
    local uc = Unicode.getRanges()
    local cp = type( analyse )
    local r  = { }
    local e, n, p, s, v
    if cp == "string" then
        e  = Unicode.flat( analyse )
        cp = { }
        n  = mw.ustring.len( e )
        for i = 1, n do
            table.insert( cp,  mw.ustring.codepoint( e, i, i ) )
        end -- for i
    elseif cp == "table" then
        cp = analyse
    elseif cp == "number" then
        cp = { analyse }
    end
    for i = 1, #cp do
        n = cp[ i ]
        p = { n, false }
        for k = 1, #uc do
            e = uc[ k ]
            if n <= e[ 2 ] then
                if n >= e[ 1 ] then
                    v = e[ 3 ]
                    if type( v ) == "table" then
                        s = v[ 1 ]
                        if assume then
                            for j = 2, #v do
                                if v[ j ] == assume then
                                    s = v[ j ]
                                    break -- for j
                                end
                            end -- for j
                        end
                    else
                        s = "???"
                    end
                    p[ 2 ] = s
                    n = false
                end
                break -- for k
            elseif n < e[ 1 ] then
                break -- for k
            end
        end -- for k
        if n then
            for j = 1, #allow do
                e = allow[ j ]
                if n <= e[ 2 ] then
                    if n >= e[ 1 ] then
                        p[ 2 ] = true
                    end
                    break -- for j
                elseif n < e[ 1 ] then
                    break -- for j
                end
            end -- for j
        end
        table.insert( r, p )
    end -- for i
    return r
end -- Unicode.getScripts()



Unicode.isScript = function ( all, ask, analyse )
    -- Check all chars for expected script code ranges
    -- Precondition:
    --     all      -- table, with all definitions
    --     ask      -- string, with supposed script code
    --     analyse  -- string or number or table, with text
    -- Returns
    --     1. true, if all chars within
    --     2. table, with analyse text
    local f = function ( array, amount, a )
                  local k = a
                  local e
                  for i = 1, amount do
                      e = array[ i ]
                      if k >= e[ 1 ] then
                          if k <= e[ 2 ] then
                              k = false
                              break -- for i
                          end
                      else
                          break -- for i
                      end
                  end -- for i
                  return k
              end
    local s  = analyse
    local cp = type( s )
    local uc = { }
    local xx = { }
    local r  = true
    local m, na, nu, nx
    if cp == "string" then
        s  =  Unicode.flat( s )
        cp = { }
        na = mw.ustring.len( s )
        for i = 1, na do
            table.insert( cp,  mw.ustring.codepoint( s, i, i ) )
        end -- for i
    elseif cp == "table" then
        cp = s
    elseif cp == "number" then
        cp = { s }
    else
        cp = { }
    end
    Unicode.merge( uc, all, ask )
    Unicode.merge( xx, all, "*" )
    na = #cp
    nu = #uc
    nx = #xx
    for j = 1, na do
        m = f( uc, nu, cp[ j ] )
        if m then
            m = f( xx, nx, m )
            if m then
                r = false
                break -- for j
            end
        end
    end -- for j
    return r, cp
end -- Unicode.isScript()



Unicode.merge = function ( accumulate, all, ask, append )
    -- Ensure single list of items
    -- Precondition:
    --     accumulate  -- table, with collection to be extended
    --     all         -- table, with all definitions
    --     ask         -- string, with requested script code
    --     append      -- true, if code names to be appended to entries
    -- The accumulate table may have been extended
    local g = all[ ask ]
    if type( g ) == "table" then
        local codes, s
        for k, v in pairs( g ) do
            s = type( v )
            break    -- for k, v
        end -- for k, v
        if s == "string" then
            for k, v in pairs( g ) do
                if append then
                    codes = { ask, v }
                    table.sort( codes )
                end
                fill( accumulate, all[ v ], codes )
            end -- for k, v
            Unicode.sort( accumulate )
        elseif s == "table" then
            if append then
                codes = { ask }
            end
            fill( accumulate, g, codes )
        end
    end
end -- Unicode.merge()



Unicode.romanNumbers = function ( array, at )
    -- Check for possible roman numbers
    -- Precondition:
    --     array  -- table, with elements as sequence tables
    --     all    -- number, with position within array
    -- Returns number, which is identical or greater than at, to proceed
    local r = at
    local e = array[ r ]
    if Unicode.RomanN.dig[ e[ 1 ] ]  and
       r > 1  and
       Unicode.RomanN.bef[ array[ r - 1 ][ 1 ] ] then
        local j = r
        while j < #array do
            e = array[ j + 1 ]
            if Unicode.RomanN.dig[ e[ 1 ] ] then
                j = j + 1
            else
                break    -- while j
            end
        end    -- while j
        if j == #array  or
           Unicode.RomanN.fol[ e[ 1 ] ] then
            r = j + 1
        end
    end
    return r
end -- Unicode.romanNumbers()



Unicode.showScripts = function ( analysed )
    -- Retrieve codepoints and assigned script codes for string
    -- Precondition:
    --     analysed  -- table, as returned by Unicode.getScripts()
    -- Returns string, with every codepoint-script identified
    local r = ""
    local c, d, k, s
    for i = 1, #analysed do
        c = analysed[ i ]
        k = c[ 1 ]
        s = string.format( "%X", k )
        d = c[ 2 ]
        if d then
            if type( d ) == "string" then
                s = string.format( "%s-%s-%s",
                                   s,
                                   mw.ustring.char( k ),
                                   d )
            end
        else
            s = s .. "-????"
        end
        r = string.format( "%s %s", r, s )
    end -- for i
    return r
end -- Unicode.showScripts()



Unicode.sort = function ( apply )
    -- Sort code ranges
    --     apply  -- table, with request
    local function f( a1, a2 )
              return a1[ 1 ] < a2[ 1 ]
          end
    table.sort( apply, f )
end -- Unicode.sort()



Unicode.testScripts = function ( assume, analyse )
    -- Check whether all chars match script
    -- Precondition:
    --     assume   -- string, with expected script code
    --     analyse  -- string or number or table, with text
    -- Postcondition:
    --     Returns
    --         1. number, of chars matching assume
    --         2. number, of chars violating assume
    local rA = 0
    local rX = 0
    local xx = { }
    local i  = 1
    local cp, e, p
    Unicode.merge( xx, ISO15924.fetch( "unicodes" ), "*" )
    cp = Unicode.getScripts( xx, analyse, assume )
    while i <= #cp do
        e = cp[ i ]
        p = e[ 2 ]
        if type( p ) == "string" then
            if p == assume then
                rA = rA + 1
            elseif p == "Latn" then
                local j = Unicode.romanNumbers( cp, i )
                if j > i then
                    i = j
                    rX = rX - 1
                end
                rX = rX + 1
            end
        end
        i = i + 1
    end    -- while i
    return rA, rX
end -- Unicode.testScripts()



ISO15924.fetch = function ( access, alert )
    -- Fetch mw.loadData component
    -- Precondition:
    --     access  -- table name
    --     alert   -- true, for throwing error on data problem
    -- Postcondition:
    --     Returns table
    local r = ISO15924[ access ]
    if type( r ) ~= "table" then
        local ext, s, sub
        if not ISO15924.config then
            ISO15924.config = true
            ISO15924.fetch( "config", alert )    -- self
            if ISO15924.config.live then
                ISO15924.statics = "commons"
            end
        end
        for i = 1, #ISO15924.Commons do
            s = ISO15924.Commons[ i ]
            if s == access then
                sub = ISO15924.statics
                break -- for i
            end
        end -- for i
        sub = sub or access
        ISO15924.loadData = ISO15924.loadData or { }
        if ISO15924.loadData[ sub ] then
            ext = ISO15924.loadData[ sub ]
        else
            ext = foreignModule( ISO15924.suite,
                                 false,
                                 sub,
                                 ISO15924.item,
                                 alert )
            ISO15924.loadData[ sub ] = ext
        end
        if type( ext ) == "table" then
            if type( ext[ access ] ) == "table" then
               r = ext[ access ]
            elseif sub == "config" then
                r = ext
            else
                r = { }
            end
        else
            r = { }
        end
        ISO15924[ access ] = r
    end
    return r
end -- ISO15924.fetch()



ISO15924.getLanguageScript = function ( ask )
    -- Retrieve primary script for language
    -- Precondition:
    --     ask  -- string, with language code
    -- Returns string, with associated script code
    local r
    if type( ask ) == "string" then
        local s = ask
        local n = #s
        if n == 7  or  n == 8 then
            r = s:match( "^%a%a%a?%-(%a%a%a%a)$" )
            if r then
                r = r:sub( 1, 1 ):upper() ..
                    r:sub( 2 ):lower()
            end
        elseif n > 3 then
            s = s:match( "^(%a%a%a?)%-" )
        end
        if not r and s then
            local written = ISO15924.fetch( "iso639script" )
            if type( written ) == "table" then
                r = written[ s:lower() ]
                if type( r ) == "table" then
                    r = r[ 1 ]
                end
            end
        end
    end
    return r or "Latn"
end -- ISO15924.getLanguageScript()



ISO15924.getScripts = function ( analyse )
    -- Retrieve codepoints and assigned script codes
    -- Precondition:
    --     analyse  -- string or number or table, with text
    -- Returns table, with all relations codepoint / scripts
    local xx = { }
    Unicode.merge( xx,  ISO15924.fetch( "unicodes" ),  "*" )
    return Unicode.getScripts( xx, analyse, false )
end -- ISO15924.getScripts()



ISO15924.isCJK = function ( ask )
    -- Check whether script is Chinese-Japanese-Korean (CJK)
    -- Precondition:
    --     ask  -- string, with language or script code
    -- Returns true, if CJK
    return fulfil( ask, "cjk" )
end -- ISO15924.isCJK()



ISO15924.isRTL = function ( ask )
    -- Check whether script is right-to-left
    -- Precondition:
    --     ask  -- string, with language or script code
    -- Returns true, if right-to-left
    return fulfil( ask, "rtl" )
end -- ISO15924.isRTL()



ISO15924.isScript = function ( assume, analyse )
    -- Check all chars for expected script code ranges
    -- Precondition:
    --     assume   -- string, with expected script code
    --     analyse  -- string or number or table, with text
    -- Returns
    --     1. true, if all chars within
    --     2. analyse as table
    return Unicode.isScript( ISO15924.fetch( "unicodes" ),
                             assume,
                             analyse )
end -- ISO15924.isScript()



ISO15924.isTrans = function ( ask, assign, about )
    -- Check whether valid transcription for context
    -- Precondition:
    --     ask     -- string, with transcription key
    --     assign  -- string, with language or scripting code
    --     about   -- string or nil, with site scripting code
    -- Postcondition:
    --     Returns boolean
    local r = false
    local t, trans
    local r, trsl
    if type( ask ) == "string" then
        local trans = ISO15924.fetch( "trans" )
        local t = trans[ assign ]
        if type( t ) == "table" then
            for k, v in pairs( t ) do
                if v == ask then
                    r = true
                    break    -- for i
                end
            end -- for k, v
        end
    end
    if not r  and  about == "Latn" then
        r = ( ask == "BGN-PCGN"  or  ask == "ALA-LC" )
    end
    return r
end -- ISO15924.isTrans()



ISO15924.scriptName = function ( assigned, alien, add )
    -- Retrieve script name, hopefully linked
    -- Precondition:
    --     assigned  -- string, with script code
    --     alien     -- string, with language code, or not
    --     add       -- arbitrary additional information
    -- Returns string
    return ISO15924.Text.scriptName( assigned, alien, add )
end -- ISO15924.scriptName()



ISO15924.showScript = function ( analyse )
    -- Retrieve assigned script code of first character
    -- Precondition:
    --     analyse  -- string or number or table, with text
    -- Returns string, with every codepoint-script identified
    local xx = { }
    local cp, r
    Unicode.merge( xx, ISO15924.fetch( "unicodes" ), "*" )
    cp = Unicode.getScripts( xx, analyse, false )
    if #cp > 0 then
        local s = cp[ 1 ][ 2 ]
        if type( s ) == "string" then
            r = s
        end
    end
    return r or false
end -- ISO15924.showScript()



ISO15924.showScripts = function ( analyse )
    -- Retrieve codepoints and assigned script codes for and as string
    -- Precondition:
    --     analyse  -- string or number or table, with text
    -- Returns string, with every codepoint-script identified
    local xx = { }
    local cp
    Unicode.merge( xx, ISO15924.fetch( "unicodes" ), "*" )
    cp = Unicode.getScripts( xx, analyse, false )
    return Unicode.showScripts( cp )
end -- ISO15924.showScripts()



ISO15924.testScripts = function ( assume, analyse )
    -- Check whether all chars match script
    -- Precondition:
    --     assume   -- string, with expected script code
    --     analyse  -- string or number or table, with text
    -- Postcondition:
    --     Returns
    --         1. number, of chars matching assume
    --         2. number, of chars violating assume
    return Unicode.testScripts( assume, analyse )
end -- ISO15924.testScripts()



Failsafe.failsafe = function ( atleast )
    -- Retrieve versioning and check for compliance
    -- Precondition:
    --     atleast  -- string, with required version or "wikidata" or "~"
    --                 or false
    -- Postcondition:
    --     Returns  string  -- with queried version, also if problem
    --              false   -- if appropriate
    -- 2025-08-07
    local last  = ( atleast == "~" )
    local since = atleast
    local r
    if last  or  since == "wikidata" then
        local item = Failsafe.item
        since = false
        if type( item ) == "number"  and  item > 0 then
            local entity = mw.wikibase.getEntity( string.format( "Q%d",
                                                                 item ) )
            if type( entity ) == "table" then
                local seek = Failsafe.serialProperty or "P348"
                local vsn  = entity:formatPropertyValues( seek )
                if type( vsn ) == "table"  and
                   type( vsn.value ) == "string"  and
                   vsn.value ~= "" then
                    if last  and  vsn.value == Failsafe.serial then
                        r = false
                    else
                        r = vsn.value
                    end
                end
            end
        end
    end
    if type( r ) == "nil" then
        if not since  or  since <= Failsafe.serial then
            r = Failsafe.serial
        else
            r = false
        end
    end
    return r
end -- Failsafe.failsafe()



-- Export
local p = { }

p.getLanguageScript = function ( frame )
    local s = mw.text.trim( frame.args[ 1 ]  or  "" )
    return ISO15924.getLanguageScript( s )
end -- p.getLanguageScript

p.isCJK = function ( frame )
    local s = mw.text.trim( frame.args[ 1 ]  or  "" )
    return ISO15924.isCJK( s )  and  "1"   or   ""
end -- p.isCJK()

p.isRTL = function ( frame )
    local s = mw.text.trim( frame.args[ 1 ]  or  "" )
    return ISO15924.isRTL( s )  and  "1"   or   ""
end -- p.isRTL()

p.isScript = function ( frame )
    local s1 = mw.text.trim( frame.args[ 1 ]  or  "" )
    local s2 = mw.text.trim( frame.args[ 2 ]  or  "" )
    local r, cp = ISO15924.isScript( s1, s2 )
    return r and "1"  or  ""
end -- p.isScript

p.isTrans = function ( frame )
    -- Check whether valid transcription for context
    --     1     -- string, with transcription key
    --     2     -- string, with language or scripting code
    --     site  -- string or nil, with site scripting code
    local s1   = mw.text.trim( frame.args[ 1 ]  or  "" )
    local s2   = mw.text.trim( frame.args[ 2 ]  or  "" )
    local site = mw.text.trim( frame.args.site  or  "" )
    return ISO15924.isTrans( s1, s2, site )  and  "1"   or   ""
end -- p.isTrans

p.scriptName = function ( frame )
    local s1    = mw.text.trim( frame.args[ 1 ]  or  "" )
    local s2    = mw.text.trim( frame.args[ 2 ]  or  "" )
    local slang = mw.text.trim( frame.args.lang  or  "" )
    return ISO15924.Text.scriptName( s1, slang, s2 )
end -- p.scriptName

p.showScript = function ( frame )
    local s = frame.args[ 1 ]
    local r
    if s then
        s = mw.text.trim( s )
        if s ~= "" then
            if s:sub( 1, 2 ) == "U+" then
                s = s:match( "^U%+(%x+)$" )
                if s then
                    s = tonumber( s, 16 )
                end
            end
            if s then
                r = ISO15924.showScript( s )
            end
        end
    end
    return r or ""
end -- p.showScript

p.showScripts = function ( frame )
    local s = frame.args[ 1 ]
    local r
    if s then
        r = ISO15924.showScripts( mw.text.trim( s ) )
    else
        r = ""
    end
    return r
end -- p.showScripts

p.failsafe = function ( frame )
    -- Versioning interface
    local s = type( frame )
    local since
    if s == "table" then
        since = frame.args[ 1 ]
    elseif s == "string" then
        since = frame
    end
    if since then
        since = mw.text.trim( since )
        if since == "" then
            since = false
        end
    end
    return Failsafe.failsafe( since )  or  ""
end -- p.failsafe()

p.ISO15924 = function ()
    return ISO15924
end -- p.ISO15924

return p
木九十眼镜什么档次 吃什么油对身体好 辅警是什么 吃什么可以降低尿酸 日加一笔变成什么字
眼睛痒用什么眼药水好 抑郁到什么程度要吃氟西汀 相依相偎是什么意思 一到晚上就饿什么原因 甲功三项查的是什么
抑郁症看什么科 女孩月经不规律是什么原因 什么时机塞给医生红包 肌肉僵硬是什么原因 仙代表什么生肖
主动脉迂曲是什么意思 脑血管挂什么科 胃疼吐酸水是什么原因 下身痒是什么原因 桑葚有什么好处
羊绒和羊毛有什么区别hcv8jop5ns1r.cn 地贫有什么症状hcv8jop8ns9r.cn 荻是什么意思beikeqingting.com 什么是外包hcv8jop7ns8r.cn 腮腺炎反复发作是什么原因hcv8jop4ns9r.cn
oil什么意思hcv9jop1ns0r.cn 梦见打雷是什么意思hcv8jop7ns5r.cn 腺肌症不治疗会导致什么结果hcv8jop1ns4r.cn 般若波罗蜜是什么意思xianpinbao.com 西地那非是什么药物hcv8jop8ns2r.cn
令妹是什么意思hcv7jop4ns8r.cn alpha是什么意思hcv9jop2ns7r.cn pdt是什么意思0297y7.com 小苏打有什么作用wmyky.com 什么意思啊hcv7jop6ns0r.cn
尾椎骨疼挂什么科hcv9jop3ns6r.cn 无动于衷是什么意思aiwuzhiyu.com 三院是什么医院cl108k.com 一个虫一个卑念什么hcv9jop8ns2r.cn ss是什么意思hcv9jop6ns9r.cn
百度