Created
August 27, 2012 15:53
-
-
Save nissuk/3489733 to your computer and use it in GitHub Desktop.
WinNls.hのLOCALEの値のおおよそ一覧
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name Hex Data | |
---- --- ---- | |
LOCALE_ILANGUAGE 0x00000001 0411 | |
LOCALE_SLANGUAGE 0x00000002 日本語 (日本) | |
LOCALE_SENGLANGUAGE 0x00001001 Japanese | |
LOCALE_SABBREVLANGNAME 0x00000003 JPN | |
LOCALE_SNATIVELANGNAME 0x00000004 日本語 | |
LOCALE_ICOUNTRY 0x00000005 81 | |
LOCALE_SCOUNTRY 0x00000006 日本 | |
LOCALE_SENGCOUNTRY 0x00001002 Japan | |
LOCALE_SABBREVCTRYNAME 0x00000007 JPN | |
LOCALE_SNATIVECTRYNAME 0x00000008 日本 | |
LOCALE_IGEOID 0x0000005B 122 | |
LOCALE_IDEFAULTLANGUAGE 0x00000009 0411 | |
LOCALE_IDEFAULTCOUNTRY 0x0000000A 81 | |
LOCALE_IDEFAULTCODEPAGE 0x0000000B 932 | |
LOCALE_IDEFAULTANSICODEPAGE 0x00001004 932 | |
LOCALE_IDEFAULTMACCODEPAGE 0x00001011 10001 | |
LOCALE_SLIST 0x0000000C , | |
LOCALE_IMEASURE 0x0000000D 0 | |
LOCALE_SDECIMAL 0x0000000E . | |
LOCALE_STHOUSAND 0x0000000F , | |
LOCALE_SGROUPING 0x00000010 3;0 | |
LOCALE_IDIGITS 0x00000011 2 | |
LOCALE_ILZERO 0x00000012 1 | |
LOCALE_INEGNUMBER 0x00001010 1 | |
LOCALE_SNATIVEDIGITS 0x00000013 0123456789 | |
LOCALE_SCURRENCY 0x00000014 \ | |
LOCALE_SINTLSYMBOL 0x00000015 JPY | |
LOCALE_SMONDECIMALSEP 0x00000016 . | |
LOCALE_SMONTHOUSANDSEP 0x00000017 , | |
LOCALE_SMONGROUPING 0x00000018 3;0 | |
LOCALE_ICURRDIGITS 0x00000019 0 | |
LOCALE_IINTLCURRDIGITS 0x0000001A 0 | |
LOCALE_ICURRENCY 0x0000001B 0 | |
LOCALE_INEGCURR 0x0000001C 1 | |
LOCALE_SDATE 0x0000001D / | |
LOCALE_STIME 0x0000001E : | |
LOCALE_SSHORTDATE 0x0000001F yyyy/MM/dd | |
LOCALE_SLONGDATE 0x00000020 yyyy'年'M'月'd'日' | |
LOCALE_STIMEFORMAT 0x00001003 H:mm:ss | |
LOCALE_IDATE 0x00000021 2 | |
LOCALE_ILDATE 0x00000022 2 | |
LOCALE_ITIME 0x00000023 1 | |
LOCALE_ITIMEMARKPOSN 0x00001005 0 | |
LOCALE_ICENTURY 0x00000024 1 | |
LOCALE_ITLZERO 0x00000025 0 | |
LOCALE_IDAYLZERO 0x00000026 1 | |
LOCALE_IMONLZERO 0x00000027 1 | |
LOCALE_S1159 0x00000028 午前 | |
LOCALE_S2359 0x00000029 午後 | |
LOCALE_ICALENDARTYPE 0x00001009 1 | |
LOCALE_IOPTIONALCALENDAR 0x0000100B 3 | |
LOCALE_IFIRSTDAYOFWEEK 0x0000100C 6 | |
LOCALE_IFIRSTWEEKOFYEAR 0x0000100D 0 | |
LOCALE_SDAYNAME1 0x0000002A 月曜日 | |
LOCALE_SDAYNAME2 0x0000002B 火曜日 | |
LOCALE_SDAYNAME3 0x0000002C 水曜日 | |
LOCALE_SDAYNAME4 0x0000002D 木曜日 | |
LOCALE_SDAYNAME5 0x0000002E 金曜日 | |
LOCALE_SDAYNAME6 0x0000002F 土曜日 | |
LOCALE_SDAYNAME7 0x00000030 日曜日 | |
LOCALE_SABBREVDAYNAME1 0x00000031 月 | |
LOCALE_SABBREVDAYNAME2 0x00000032 火 | |
LOCALE_SABBREVDAYNAME3 0x00000033 水 | |
LOCALE_SABBREVDAYNAME4 0x00000034 木 | |
LOCALE_SABBREVDAYNAME5 0x00000035 金 | |
LOCALE_SABBREVDAYNAME6 0x00000036 土 | |
LOCALE_SABBREVDAYNAME7 0x00000037 日 | |
LOCALE_SMONTHNAME1 0x00000038 1月 | |
LOCALE_SMONTHNAME2 0x00000039 2月 | |
LOCALE_SMONTHNAME3 0x0000003A 3月 | |
LOCALE_SMONTHNAME4 0x0000003B 4月 | |
LOCALE_SMONTHNAME5 0x0000003C 5月 | |
LOCALE_SMONTHNAME6 0x0000003D 6月 | |
LOCALE_SMONTHNAME7 0x0000003E 7月 | |
LOCALE_SMONTHNAME8 0x0000003F 8月 | |
LOCALE_SMONTHNAME9 0x00000040 9月 | |
LOCALE_SMONTHNAME10 0x00000041 10月 | |
LOCALE_SMONTHNAME11 0x00000042 11月 | |
LOCALE_SMONTHNAME12 0x00000043 12月 | |
LOCALE_SMONTHNAME13 0x0000100E | |
LOCALE_SABBREVMONTHNAME1 0x00000044 1 | |
LOCALE_SABBREVMONTHNAME2 0x00000045 2 | |
LOCALE_SABBREVMONTHNAME3 0x00000046 3 | |
LOCALE_SABBREVMONTHNAME4 0x00000047 4 | |
LOCALE_SABBREVMONTHNAME5 0x00000048 5 | |
LOCALE_SABBREVMONTHNAME6 0x00000049 6 | |
LOCALE_SABBREVMONTHNAME7 0x0000004A 7 | |
LOCALE_SABBREVMONTHNAME8 0x0000004B 8 | |
LOCALE_SABBREVMONTHNAME9 0x0000004C 9 | |
LOCALE_SABBREVMONTHNAME10 0x0000004D 10 | |
LOCALE_SABBREVMONTHNAME11 0x0000004E 11 | |
LOCALE_SABBREVMONTHNAME12 0x0000004F 12 | |
LOCALE_SABBREVMONTHNAME13 0x0000100F | |
LOCALE_SPOSITIVESIGN 0x00000050 | |
LOCALE_SNEGATIVESIGN 0x00000051 - | |
LOCALE_IPOSSIGNPOSN 0x00000052 3 | |
LOCALE_INEGSIGNPOSN 0x00000053 3 | |
LOCALE_IPOSSYMPRECEDES 0x00000054 1 | |
LOCALE_IPOSSEPBYSPACE 0x00000055 0 | |
LOCALE_INEGSYMPRECEDES 0x00000056 1 | |
LOCALE_INEGSEPBYSPACE 0x00000057 0 | |
LOCALE_FONTSIGNATURE 0x00000058 | |
LOCALE_SISO639LANGNAME 0x00000059 ja | |
LOCALE_SISO3166CTRYNAME 0x0000005A JP | |
LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 20290 | |
LOCALE_IPAPERSIZE 0x0000100A 9 | |
LOCALE_SENGCURRNAME 0x00001007 Japanese Yen | |
LOCALE_SNATIVECURRNAME 0x00001008 円 | |
LOCALE_SYEARMONTH 0x00001006 yyyy'年'M'月' | |
LOCALE_SSORTNAME 0x00001013 XJIS | |
LOCALE_IDIGITSUBSTITUTION 0x00001014 1 | |
LOCALE_SNAME 0x0000005c ja-JP | |
LOCALE_SDURATION 0x0000005d H:mm:ss | |
LOCALE_SKEYBOARDSTOINSTALL 0x0000005e 0411:{03B5835F-F03C-411B-9CE2-AA23E1171E36}{A76C93D9-5523-4E90-AAFA-4DB112F9AC76} | |
LOCALE_SSHORTESTDAYNAME1 0x00000060 月 | |
LOCALE_SSHORTESTDAYNAME2 0x00000061 火 | |
LOCALE_SSHORTESTDAYNAME3 0x00000062 水 | |
LOCALE_SSHORTESTDAYNAME4 0x00000063 木 | |
LOCALE_SSHORTESTDAYNAME5 0x00000064 金 | |
LOCALE_SSHORTESTDAYNAME6 0x00000065 土 | |
LOCALE_SSHORTESTDAYNAME7 0x00000066 日 | |
LOCALE_SISO639LANGNAME2 0x00000067 jpn | |
LOCALE_SISO3166CTRYNAME2 0x00000068 JPN | |
LOCALE_SNAN 0x00000069 NaN (非数値) | |
LOCALE_SPOSINFINITY 0x0000006a +∞ | |
LOCALE_SNEGINFINITY 0x0000006b -∞ | |
LOCALE_SSCRIPTS 0x0000006c Hani;Hira;Jpan;Kana; | |
LOCALE_SPARENT 0x0000006d ja | |
LOCALE_SCONSOLEFALLBACKNAME 0x0000006e ja-JP | |
LOCALE_SLANGDISPLAYNAME 0x0000006f 日本語 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
using System.IO; | |
namespace LocaleInfo | |
{ | |
class Program | |
{ | |
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] | |
public static extern int GetLocaleInfoEx(string lpLocaleName, uint LCType, StringBuilder lpLCData, int cchData); | |
static string GetLocaleInfoString(string hex, string lang) | |
{ | |
var lcType = Convert.ToUInt32(hex, 16); | |
var cchData = 512; | |
var data = new StringBuilder(cchData); | |
GetLocaleInfoEx(lang, lcType, data, cchData); | |
return data.ToString(); | |
} | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("{0, -30} {1, -11} {2}", "Name", "Hex", "Data"); | |
Console.WriteLine("{0, -30} {1, -11} {2}", "----", "---", "----"); | |
// WinNls.hから定数名とhexの一覧をCSVに保存したものを回します。 | |
foreach (var x in File.ReadAllLines("x.csv")) { | |
var cells = x.Split(','); | |
if (cells.Length <= 2) continue; | |
var constName = cells[0]; | |
var hex = cells[1]; | |
var data = GetLocaleInfoString(cells[1], "ja-JP"); | |
Console.WriteLine(string.Format("{0, -30} {1, -11} {2}", constName, hex, data)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment