これはなに? †
- IBM の多言語ライブラリ。International Components for Unicode
- ライセンスは ICU ライセンス (このライセンス書を製品に添付すれば、あとはどう使ってもいい。何か起こっても責任は取らんけど)
文字変換 †
日本で主に使うのは、半角カナ→全角カナ、カタカナ→ひらがな、カタカナ→ローマ字表記、ひらがな→ローマ字表記 くらいかな
プログラム †
package com.snail.exam.icu4jexam;
import com.ibm.icu.text.Transliterator;
import java.util.Enumeration;
public class App
{
public static final String[] SEGER_CONE
= {"ハンカクカナ","ABC","123","カタカナ","ひらがな","漢字","ABC","123"," "," "};
public static void main( String[] args )
{
Enumeration<String> ids = Transliterator.getAvailableIDs();
Transliterator tr;
while(ids.hasMoreElements()){
String id = ids.nextElement();
System.out.print("," + id);
tr = Transliterator.getInstance(id);
for (String str : SEGER_CONE) {
System.out.print(",\"\"" + tr.transliterate(str) + "\"\"");
}
System.out.print("\n");
}
}
}
pom.xml †
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.snail.exam</groupId>
<artifactId>ICU4jExam</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ICU4jExam</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>4.0.1</version>
</dependency>
</dependencies>
</project>
実行結果 †
変換元 | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Accents-Any | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-Accents | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-Publishing | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Arabic-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Armenian-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Bengali-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Cyrillic-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Devanagari-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Digit-Tone | "ハンカクカナ" | "ABC" | "̄́̌" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Fullwidth-Halfwidth | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Georgian-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Greek-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Greek-Latin/UNGEGN | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gujarati-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Gurmukhi-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Halfwidth-Fullwidth | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Han-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "hàn zì" | "ABC" | "123" | " " | " " |
Hangul-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Hebrew-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Hiragana-Katakana | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ヒラガナ" | "漢字" | "ABC" | "123" | " " | " " |
Hiragana-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "hiragana" | "漢字" | "ABC" | "123" | " " | " " |
Jamo-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Kannada-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Katakana-Hiragana | "はんかくかな" | "ABC" | "123" | "かたかな" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Katakana-Latin | "hankakukana" | "ABC" | "123" | "katakana" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Arabic | "ハンカクカナ" | "َبك" | "١٢٣" | "カタカナ" | "ひらがな" | "漢字" | "abc" | "123" | " " | " " |
Latin-Armenian | "ハンカクカナ" | "ԱԲԾ" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Bengali | "ハンカクカナ" | "অব্চ্" | "১২৩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Cyrillic | "ハンカクカナ" | "АБЦ" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Devanagari | "ハンカクカナ" | "अब्च्" | "१२३" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Georgian | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Greek | "ハンカクカナ" | "ἈΒΚ" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Greek/UNGEGN | "ハンカクカナ" | "ΑΜΠΚ" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Gujarati | "ハンカクカナ" | "અબ્ચ્" | "૧૨૩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Gurmukhi | "ハンカクカナ" | "ਅਬ੍ਚ੍" | "੧੨੩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Han | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Hangul | "ハンカクカナ" | "압크" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Hebrew | "ハンカクカナ" | "ַבק" | "123" | "カタカナ" | "ひらがな" | "漢字" | "abc" | "123" | " " | " " |
Latin-Hiragana | "ハンカクカナ" | "あぶく" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Jamo | "ハンカクカナ" | "압크" | "123" | "カタカナ" | "ひらがな" | "漢字" | "abc" | "123" | " " | " " |
Latin-Kannada | "ハンカクカナ" | "ಅಬ್ಚ್" | "೧೨೩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Katakana | "ハンカクカナ" | "アブク" | "123" | "カタカナ" | "ひらがな" | "漢字" | "アブク" | "123" | " " | " " |
Latin-Malayalam | "ハンカクカナ" | "അബ്ച്" | "൧൨൩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-NumericPinyin? | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Oriya | "ハンカクカナ" | "ଅବ୍ଚ୍" | "୧୨୩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Syriac | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Tamil | "ハンカクカナ" | "அப்ச்" | "௧௨௩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Telugu | "ハンカクカナ" | "అబ్చ్" | "౧౨౩" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Thaana | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Latin-Thai | "ハンカクカナ" | "ะบจ" | "๑๒๓" | "カタカナ" | "ひらがな" | "漢字" | "abc" | "123" | " " | " " |
Malayalam-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Malayalam-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
NumericPinyin?-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
NumericPinyin?-Pinyin | "ハンカクカナ" | "ABC" | "̄́̌" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Oriya-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Pinyin-NumericPinyin? | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Publishing-Any | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Simplified-Traditional | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Syriac-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tamil-Telugu | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Bengali | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Devanagari | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Gujarati | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Gurmukhi | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Kannada | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Malayalam | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Oriya | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Telugu-Tamil | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Thaana-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Thai-Latin | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Tone-Digit | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Traditional-Simplified | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "汉字" | "ABC" | "123" | " " | " " |
Any-Null | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-Remove | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" |
Any-Lower | "ハンカクカナ" | "abc" | "123" | "カタカナ" | "ひらがな" | "漢字" | "abc" | "123" | " " | " " |
Any-Upper | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-Title | "ハンカクカナ" | "Abc" | "123" | "カタカナ" | "ひらがな" | "漢字" | "Abc" | "123" | " " | " " |
Name-Any | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-NFC | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-NFD | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-NFKC | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-NFKD | "ハンカクカナ" | "ABC" | "123" | "カタカナ" | "ひらがな" | "漢字" | "ABC" | "123" | " " | " " |
Any-Latin | "hankakukana" | "ABC" | "123" | "katakana" | "hiragana" | "hàn zì" | "ABC" | "123" | " " | " " |
Any-Telugu | "హన్కకుకన" | "అబ్చ్" | "123" | "కతకన" | "హిరగన" | "హ̀న్ జి̀" | "ABC" | "123" | " " | " " |
Any-Malayalam | "ഹന്കകുകന" | "അബ്ച്" | "123" | "കതകന" | "ഹിരഗന" | "ഹ̀ന് ജി̀" | "ABC" | "123" | " " | " " |
Any-Oriya | "ହନ୍କକୁକନ" | "ଅବ୍ଚ୍" | "123" | "କତକନ" | "ହିରଗନ" | "ହ̀ନ୍ ଜ଼ି̀" | "ABC" | "123" | " " | " " |
Any-Gurmukhi | "ਹਨ੍ਕਕੁਕਨ" | "ਅਬ੍ਚ੍" | "123" | "ਕਤਕਨ" | "ਹਿਰਗਨ" | "ਹ̀ਨ੍ ਜ਼ਿ̀" | "ABC" | "123" | " " | " " |
Any-Gujarati | "હન્કકુકન" | "અબ્ચ્" | "123" | "કતકન" | "હિરગન" | "હ̀ન્ જ઼િ̀" | "ABC" | "123" | " " | " " |
Any-Bengali | "হন্ককুকন" | "অব্চ্" | "123" | "কতকন" | "হিরগন" | "হ̀ন্ জ়ি̀" | "ABC" | "123" | " " | " " |
Any-Devanagari | "हन्ककुकन" | "अब्च्" | "123" | "कतकन" | "हिरगन" | "ह̀न् ज़ि̀" | "ABC" | "123" | " " | " " |
Any-Kannada | "ಹನ್ಕಕುಕನ" | "ಅಬ್ಚ್" | "123" | "ಕತಕನ" | "ಹಿರಗನ" | "ಹ̀ನ್ ಜಿ̀" | "ABC" | "123" | " " | " " |
Any-Tamil | "ஹந்ககுகந" | "அப்ச்" | "123" | "கதகந" | "ஹிரகந" | "ஹ̀ந் ஜி̀" | "ABC" | "123" | " " | " " |
Any-Han | "hankakukana" | "ABC" | "123" | "katakana" | "hiragana" | "漢字" | "ABC" | "123" | " " | " " |
Any-Katakana | "ハンカクカナ" | "アブク" | "123" | "カタカナ" | "ヒラガナ" | "ハ̀ン ゼィ̀" | "アブク" | "123" | " " | " " |
Any-Hiragana | "はんかくかな" | "あぶく" | "123" | "かたかな" | "ひらがな" | "は̀ん ぜぃ̀" | "ABC" | "123" | " " | " " |
Any-Armenian | "հանկակուկանա" | "ԱԲԾ" | "123" | "կատականա" | "հիրագանա" | "հա̀ն զի̀" | "ABC" | "123" | " " | " " |
Any-Cyrillic | "ханкакукана" | "АБЦ" | "123" | "катакана" | "хирагана" | "ха̀н зѝ" | "ABC" | "123" | " " | " " |
Any-Hangul | "한카쿠카나" | "압크" | "123" | "카타카나" | "히라가나" | "하̀느 시̀" | "ABC" | "123" | " " | " " |
Any-Arabic | "هَنكَكُكَنَ" | "َبك" | "123" | "كَتَكَنَ" | "هِرَگَنَ" | "هَ̀ن زِ̀" | "abc" | "123" | " " | " " |
Any-Greek | "ἁγκακυκανα" | "ἈΒΚ" | "123" | "κατακανα" | "ἱραγανα" | "ἃν ζὶ" | "ABC" | "123" | " " | " " |
Any-Greek/UNGEGN | "χαγκακυκανα" | "ΑΜΠΚ" | "123" | "κατακανα" | "χιραγανα" | "χὰν ζὶ" | "ABC" | "123" | " " | " " |
Any-Hebrew | "הַנכַכֻכַנַ" | "ַבק" | "123" | "כַטַכַנַ" | "הִרַגַנַ" | "הֲן זִ̀" | "abc" | "123" | " " | " " |
Any-Thai | "กะนกะกุกะนะ" | "ะบจ" | "123" | "กะตะกะนะ" | "กิระกะนะ" | "กะ่นซิ่" | "abc" | "123" | " " | " " |
Any-Syriac | "ܗܲܢܟܲܟܼܟܲܢܲ" | "ABC" | "123" | "ܟܲܬܲܟܲܢܲ" | "ܗ݂ܪܲܓܲܢܲ" | "ܗàܢ ܙì" | "ABC" | "123" | " " | " " |
Any-Thaana | "hankakukana" | "ABC" | "123" | "katakana" | "hiragana" | "hàn zì" | "ABC" | "123" | " " | " " |
Any-Georgian | "ჰანქაქუქანა" | "ABC" | "123" | "ქათაქანა" | "ჰირაგანა" | "ჰàნ ზì" | "ABC" | "123" | " " | " " |
このほかに
- Unicodeの値との変換
変換元 | ハンカクカナ |
Any-Hex/Unicode | U+FF8AU+FF9DU+FF76U+FF78U+FF76U+FF85 |
Any-Hex/Java | \uFF8A\uFF9D\uFF76\uFF78\uFF76\uFF85 |
Any-Hex/C | \uFF8A\uFF9D\uFF76\uFF78\uFF76\uFF85 |
Any-Hex/XML | ハンカクカナ |
Any-Hex/XML10 | ハンカクカナ |
Any-Hex/Perl | \x{FF8A}\x{FF9D}\x{FF76}\x{FF78}\x{FF76}\x{FF85} |
Any-Hex | \FF8A\FF9D\FF76\FF78\FF76\FF85 |
とその逆の Hex-Any/Unicode, Hex-Any/Java, Hex-Any/C, Hex-Any/XML, Hex-Any/XML10, Hex-Any/Perl, Hex-Any
- 文字種の特定 (Any-Name)
ハ | \N{HALFWIDTH KATAKANA LETTER HA} |
ン | \N{HALFWIDTH KATAKANA LETTER N} |
カ | \N{HALFWIDTH KATAKANA LETTER KA} |
ク | \N{HALFWIDTH KATAKANA LETTER KU} |
カ | \N{HALFWIDTH KATAKANA LETTER KA} |
ナ | \N{HALFWIDTH KATAKANA LETTER NA} |
元号の変換 †
プログラム †
package com.snail.exam.icu4jexam;
import com.ibm.icu.text.DateFormat;
import com.ibm.icu.text.DateFormatSymbols;
import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.GregorianCalendar;
import com.ibm.icu.util.JapaneseCalendar;
import java.text.ParseException;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
public class App2 {
private static DateFormat df;
public static void main(String[] args){
JapaneseCalendar jc = new JapaneseCalendar();
DateFormatSymbols dfs = new DateFormatSymbols(jc, Locale.JAPANESE);
df = new SimpleDateFormat("Gyy年MM月dd日", dfs);
df.setCalendar(jc);
// 大化の改新 (日本の最初の元号)
System.out.println(d(645,5,19));
// 1868-10-23 (太陰暦 9月8日) に、同年1月1日から明治とする詔勅
System.out.println(d(1868,1,1));
System.out.println(d(1868,9,7));
System.out.println(d(1868,9,8));
System.out.println(d(1869,1,1));
// 1922-07-30 大正天皇即位
System.out.println(d(1912,7,29));
System.out.println(d(1912,7,30));
// 1926-12-25 昭和天皇即位
System.out.println(d(1926,12,24));
System.out.println(d(1926,12,25));
// 1989-01-08 今上天皇即位
System.out.println(d(1989,1,7));
System.out.println(d(1989,1,8));
try {
System.out.println(df.parse("応仁1年1月17日").toString());
} catch (ParseException ex) {
Logger.getLogger(App2.class.getName()).log(Level.SEVERE, null, ex);
}
}
public static String d(int year,int month,int day){
// com.ibm.icu.util.GregorianCalendar の月番号は、
// January = 0, ... ,December = 11
return year + ":" + df.format(new GregorianCalendar(year, month - 1, day).getTime());
}
}
実行結果 †
645:大化01年05月19日
1868:慶応04年01月01日
1868:慶応04年09月07日
1868:明治01年09月08日
1869:明治02年01月01日
1912:明治45年07月29日
1912:大正01年07月30日
1926:大正15年12月24日
1926:昭和01年12月25日
1989:昭和64年01月07日
1989:平成01年01月08日
Sat Jan 17 00:00:00 JST 1467
- 明治元年の扱いに若干の疑問があるが、上手くできている
- 応仁の乱が始まった 応仁1年1月17日 もちゃんと 1467年 に変換された