<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Modul:Unicode data/datasets - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Modul:Unicode_data/datasets&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Tue, 17 Nov 2026 17:13:02 GMT</lastBuildDate>
		<item>
			<title>Programmer: Oʻzbekcha Vikipediyadan import qilindi.</title>
			<link>https://ziyosfera.uz/index.php?title=Modul:Unicode_data/datasets&amp;diff=110771&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Modul:Unicode_data/datasets&amp;diff=110771&amp;oldid=prev</guid>
			<description>&lt;p&gt;Oʻzbekcha Vikipediyadan import qilindi.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
&lt;br /&gt;
--[==[&lt;br /&gt;
Fetches a data set from Wikimedia Commons by the name `dataset_name`, parses it as a Unicode character key-value table, and returns that table.&lt;br /&gt;
&lt;br /&gt;
The table is assumed to have at least two fields with the `name` fields set to `key` and `value`. Both values are expected to be strings. The key string is parsed as a hexadecimal numeric literal (e.g. `0x1234`) and converted into a number.&lt;br /&gt;
&lt;br /&gt;
The table returned will then have numbers as the keys and strings as the values.]==]&lt;br /&gt;
function export.dataset(dataset_name)&lt;br /&gt;
	local dataset = mw.ext.data.get(dataset_name)&lt;br /&gt;
	&lt;br /&gt;
	if not dataset then error(&amp;quot;Dataset &amp;quot; .. dataset_name .. &amp;quot; not found&amp;quot;) end&lt;br /&gt;
	&lt;br /&gt;
	-- Check schema.&lt;br /&gt;
	local charcode_index = nil&lt;br /&gt;
	local value_index = nil&lt;br /&gt;
	for index, field in ipairs(dataset.schema.fields) do&lt;br /&gt;
		local field_name_lower = field.name:lower()&lt;br /&gt;
		if field_name_lower:find(&amp;quot;key&amp;quot;) and field.type == &amp;quot;string&amp;quot; then&lt;br /&gt;
			charcode_index = index&lt;br /&gt;
		elseif field_name_lower:find(&amp;quot;value&amp;quot;) and field.type == &amp;quot;string&amp;quot; then&lt;br /&gt;
			value_index = index&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not charcode_index then error(&amp;quot;Character code field (name=&amp;#039;key&amp;#039;, type=&amp;#039;string&amp;#039;) not found in data schema.&amp;quot;) end&lt;br /&gt;
	if not value_index then error(&amp;quot;Value field (name=&amp;#039;value&amp;#039;, type=&amp;#039;string&amp;#039;) not found in data schema.&amp;quot;) end&lt;br /&gt;
	&lt;br /&gt;
	-- Extract values from dataset data.&lt;br /&gt;
	local result = {}&lt;br /&gt;
	for _, item in ipairs(dataset.data) do&lt;br /&gt;
		result[tonumber(item[charcode_index])] = item[value_index]&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 12:12:41 GMT</pubDate>
			<dc:creator>Programmer</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Modul_munozarasi:Unicode_data/datasets</comments>
		</item>
</channel></rss>