Replace Html Special Char Java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package htmlspecialchar;

/**
 *
 * @author ai
 */
public class HtmlSpecialChar {

    String[][] htmlString = {
        {"&", new String(Character.toChars(38))},// アンパサンド
        {"¦", new String(Character.toChars(166))},// 破断縦線
        {"µ", new String(Character.toChars(181))},// マイクロ記号
        {"‰", new String(Character.toChars(8240))},// パーミル
        {"¤", new String(Character.toChars(164))},// 一般通貨記号
        {"€", new String(Character.toChars(128))},// ユーロ記号
        {"¢", new String(Character.toChars(162))},// セント記号
        {"£", new String(Character.toChars(163))},// ポンド記号
        {"¥", new String(Character.toChars(165))},// 円記号
        {"©", new String(Character.toChars(169))},// 著作権記号
        {"®", new String(Character.toChars(174))},// 登録商標記号
        {"™", new String(Character.toChars(8482))},// 商標記号
        {"↑", new String(Character.toChars(8593))},// 上向き矢印
        {"→", new String(Character.toChars(8594))},// 右向き矢印
        {"↓", new String(Character.toChars(8595))},// 下向き矢印
        {"←", new String(Character.toChars(8592))},// 左向き矢印
        {"↔", new String(Character.toChars(8596))},// 左右両向き矢印
        {"⇑", new String(Character.toChars(8657))},// 上向き二重矢印
        {"⇒", new String(Character.toChars(8658))},// 右向き二重矢印
        {"⇓", new String(Character.toChars(8659))},// 下向き二重矢印
        {"⇐", new String(Character.toChars(8656))},// 左向き二重矢印
        {"⇔", new String(Character.toChars(8660))},// 左右両向き二重矢印
        {"♠", new String(Character.toChars(9824))},// スペードマーク
        {"♣", new String(Character.toChars(9827))},// クラブマーク
        {"♥", new String(Character.toChars(9829))},// ハートマーク
        {"♦", new String(Character.toChars(9830))},// ダイヤマーク
        {"ª", new String(Character.toChars(170))},// 女性序数標識
        {"º", new String(Character.toChars(186))},// 男性序数標識
        {"¹", new String(Character.toChars(185))},// 上付き1
        {"²", new String(Character.toChars(178))},// 上付き2
        {"³", new String(Character.toChars(179))},// 上付き3
        {"½", new String(Character.toChars(189))},// 2分の1
        {"¼", new String(Character.toChars(188))},// 4分の1
        {"¾", new String(Character.toChars(190))},// 4分の3
        {"·", new String(Character.toChars(183))},// 中点
        {"¡", new String(Character.toChars(161))},// 逆さ感嘆符
        {"¿", new String(Character.toChars(191))},// 逆さ疑問符
        {""", new String(Character.toChars(34))},// 引用符
        {"‘", new String(Character.toChars(8216))},// 左一重引用符
        {"’", new String(Character.toChars(8217))},// 右一重引用符
        {"“", new String(Character.toChars(8220))},// 左二重引用符
        {"”", new String(Character.toChars(8221))},// 右二重引用符
        {"«", new String(Character.toChars(171))},// 左二重角引用符
        {"»", new String(Character.toChars(187))},// 右二重角引用符
        {" ", new String(Character.toChars(160))},// 改行なし空白
        {" ", new String(Character.toChars(8195))},// “m”幅空白
        {" ", new String(Character.toChars(8194))},// “n”幅空白
        {" ", new String(Character.toChars(8201))},// 狭い空白
        {"—", new String(Character.toChars(8212))},// “m”幅ダッシュ
        {"–", new String(Character.toChars(8211))},// “n”幅ダッシュ
        {"­", new String(Character.toChars(173))},// ソフトハイフン
        {"•", new String(Character.toChars(8226))},// 行頭文字
        {"¶", new String(Character.toChars(182))},// 段落記号
        {"§", new String(Character.toChars(167))},// セクション記号
        {"†", new String(Character.toChars(8224))},// ダガー記号
        {"‡", new String(Character.toChars(8225))},// ダブルダガー記号
        {"…", new String(Character.toChars(8230))},// 省略記号
        {"◊", new String(Character.toChars(9674))},// 菱形
        {"∞", new String(Character.toChars(8734))},// 無限記号
        {"√", new String(Character.toChars(8730))},// 根号
        {"−", new String(Character.toChars(8722))},// マイナス
        {"±", new String(Character.toChars(177))},// プラスマイナス
        {"×", new String(Character.toChars(215))},// 乗算記号
        {"÷", new String(Character.toChars(247))},// 除算記号
        {"≠", new String(Character.toChars(8800))},// 等しくない
        {"≈", new String(Character.toChars(8776))},// ほぼ等しい
        {"≅", new String(Character.toChars(8773))},// およそ等しい
        {">", new String(Character.toChars(62))},// 大なり
        {"<", new String(Character.toChars(60))},// 小なり
        {"≥", new String(Character.toChars(8805))},// 大なりまたは等しい
        {"≤", new String(Character.toChars(8804))},// 小なりまたは等しい
        {"ƒ", new String(Character.toChars(402))},// 関数記号
        {"∝", new String(Character.toChars(8733))},// 比例する
        {"′", new String(Character.toChars(8242))},// プライム
        {"″", new String(Character.toChars(8243))},// 二重プライム
        {"∫", new String(Character.toChars(8747))},// 積分記号
        {"∂", new String(Character.toChars(8706))},// 偏微分
        {"∇", new String(Character.toChars(8711))},// ナブラ
        {"∑", new String(Character.toChars(8721))},// 数列の和
        {"∏", new String(Character.toChars(8719))},// 数列の積、直積
        {"ℑ", new String(Character.toChars(8465))},// 虚数
        {"ℜ", new String(Character.toChars(8476))},// 実数
        {"℘", new String(Character.toChars(8472))},// ワイエルシュトラスのP
        {"∼", new String(Character.toChars(8764))},// チルダ演算子
        {"∴", new String(Character.toChars(8756))},// 故に
        {"ϖ", new String(Character.toChars(982))},// パイ記号
        {"∠", new String(Character.toChars(8736))},// 角
        {"°", new String(Character.toChars(176))},// 度記号
        {"⊥", new String(Character.toChars(8869))},// 直交する
        {"≡", new String(Character.toChars(8801))},// 合同な
        {"¬", new String(Character.toChars(172))},// 否定記号
        {"∀", new String(Character.toChars(8704))},// 任意の
        {"∃", new String(Character.toChars(8707))},// 存在する
        {"∧", new String(Character.toChars(8743))},// 論理積
        {"∨", new String(Character.toChars(8744))},// 論理和
        {"∅", new String(Character.toChars(8709))},// 空集合
        {"∩", new String(Character.toChars(8745))},// 集合積
        {"∪", new String(Character.toChars(8746))},// 集合和
        {"∈", new String(Character.toChars(8712))},// ~の要素である
        {"∉", new String(Character.toChars(8713))},// ~の要素ではない
        {"∋", new String(Character.toChars(8715))},// ~を要素として含む
        {"⊂", new String(Character.toChars(8834))},// 含まれる
        {"⊃", new String(Character.toChars(8835))},// 含む
        {"⊄", new String(Character.toChars(8836))},// 含まれない
        {"⊆", new String(Character.toChars(8838))},// 含まれるか等しい
        {"⊇", new String(Character.toChars(8839))},// 含むか等しい
        {"⋅", new String(Character.toChars(8901))},// 点演算子
        {"∗", new String(Character.toChars(8727))},// アスタリスク演算子
        {"⊕", new String(Character.toChars(8853))},// 丸囲み加算(直和)
        {"⊗", new String(Character.toChars(8855))},// 丸囲み乗算(直積)
        {"⌈", new String(Character.toChars(8968))},// 左上限
        {"⌊", new String(Character.toChars(8970))},// 左下限
        {"⌉", new String(Character.toChars(8969))},// 右上限
        {"⌋", new String(Character.toChars(8971))},// 右下限
        {"´", new String(Character.toChars(180))},// アキュートアクセント
        {"¸", new String(Character.toChars(184))},// セディラ(セディーユ)
        {"ˆ", new String(Character.toChars(710))},// サーカムフレックス
        {"¯", new String(Character.toChars(175))},// マクロン
        {"˜", new String(Character.toChars(732))},// チルダ
        {"¨", new String(Character.toChars(168))},// ウムラウト(ダイエリシス)
        {"á", new String(Character.toChars(225))},// 小文字Aアキュート
        {"Á", new String(Character.toChars(193))},// 大文字Aアキュート
        {"â", new String(Character.toChars(226))},// 小文字Aサーカムフレックス
        {"Â", new String(Character.toChars(194))},// 大文字Aサーカムフレックス
        {"æ", new String(Character.toChars(230))},// 小文字AE合字(リガチャ)
        {"Æ", new String(Character.toChars(198))},// 大文字AE合字(リガチャ)
        {"à", new String(Character.toChars(224))},// 小文字Aグレーブ
        {"À", new String(Character.toChars(192))},// 大文字Aグレーブ
        {"å", new String(Character.toChars(229))},// 小文字Aリング
        {"Å", new String(Character.toChars(197))},// 大文字Aリング
        {"ã", new String(Character.toChars(227))},// 小文字Aチルダ
        {"Ã", new String(Character.toChars(195))},// 大文字Aチルダ
        {"ä", new String(Character.toChars(228))},// 小文字Aウムラウト
        {"Ä", new String(Character.toChars(196))},// 大文字Aウムラウト
        {"ç", new String(Character.toChars(231))},// 小文字Cセディラ
        {"Ç", new String(Character.toChars(199))},// 大文字Cセディラ
        {"é", new String(Character.toChars(233))},// 小文字Eアキュート
        {"É", new String(Character.toChars(201))},// 大文字Eアキュート
        {"ê", new String(Character.toChars(234))},// 小文字Eサーカムフレックス
        {"Ê", new String(Character.toChars(202))},// 大文字Eサーカムフレックス
        {"è", new String(Character.toChars(232))},// 小文字Eグレーブ
        {"È", new String(Character.toChars(200))},// 大文字Eグレーブ
        {"ð", new String(Character.toChars(240))},// 小文字Eth(アイスランド語)
        {"Ð", new String(Character.toChars(208))},// 大文字Eth(アイスランド語)
        {"ë", new String(Character.toChars(235))},// 小文字Eウムラウト
        {"Ë", new String(Character.toChars(203))},// 大文字Eウムラウト
        {"í", new String(Character.toChars(237))},// 小文字Iアキュート
        {"Í", new String(Character.toChars(205))},// 大文字Iアキュート
        {"î", new String(Character.toChars(238))},// 小文字Iサーカムフレックス
        {"Î", new String(Character.toChars(206))},// 大文字Iサーカムフレックス
        {"ì", new String(Character.toChars(236))},// 小文字Iグレーブ
        {"Ì", new String(Character.toChars(204))},// 大文字Iグレーブ
        {"ï", new String(Character.toChars(239))},// 小文字Iウムラウト
        {"Ï", new String(Character.toChars(207))},// 大文字Iウムラウト
        {"ñ", new String(Character.toChars(241))},// 小文字Nチルダ
        {"Ñ", new String(Character.toChars(209))},// 大文字Nチルダ
        {"ó", new String(Character.toChars(243))},// 小文字Oアキュート
        {"Ó", new String(Character.toChars(211))},// 大文字Oアキュート
        {"ô", new String(Character.toChars(244))},// 小文字Oサーカムフレックス
        {"Ô", new String(Character.toChars(212))},// 大文字Oサーカムフレックス
        {"ò", new String(Character.toChars(242))},// 小文字Oグレーブ
        {"Ò", new String(Character.toChars(210))},// 大文字Oグレーブ
        {"ø", new String(Character.toChars(248))},// 小文字Oスラッシュ
        {"Ø", new String(Character.toChars(216))},// 大文字Oスラッシュ
        {"õ", new String(Character.toChars(245))},// 小文字Oチルダ
        {"Õ", new String(Character.toChars(213))},// 大文字Oチルダ
        {"ö", new String(Character.toChars(246))},// 小文字Oウムラウト
        {"Ö", new String(Character.toChars(214))},// 大文字Oウムラウト
        {"œ", new String(Character.toChars(339))},// 小文字OE合字(リガチャ)
        {"Œ", new String(Character.toChars(338))},// 大文字OE合字(リガチャ)
        {"ß", new String(Character.toChars(223))},// エスツェット(ドイツ語)
        {"š", new String(Character.toChars(353))},// 小文字Sキャロン(ハーチェク)
        {"Š", new String(Character.toChars(352))},// 大文字Sキャロン(ハーチェク)
        {"þ", new String(Character.toChars(254))},// 小文字Thorn(アイスランド語)
        {"Þ", new String(Character.toChars(222))},// 大文字Thorn(アイスランド語)
        {"ú", new String(Character.toChars(250))},// 小文字Uアキュート
        {"Ú", new String(Character.toChars(218))},// 大文字Uアキュート
        {"û", new String(Character.toChars(251))},// 小文字Uサーカムフレックス
        {"Û", new String(Character.toChars(219))},// 大文字Uサーカムフレックス
        {"ù", new String(Character.toChars(249))},// 小文字Uグレーブ
        {"Ù", new String(Character.toChars(217))},// 大文字Uグレーブ
        {"ü", new String(Character.toChars(252))},// 小文字Uウムラウト
        {"Ü", new String(Character.toChars(220))},// 大文字Uウムラウト
        {"ý", new String(Character.toChars(253))},// 小文字Yアキュート
        {"Ý", new String(Character.toChars(221))},// 大文字Yアキュート
        {"ÿ", new String(Character.toChars(255))},// 小文字Yウムラウト
        {"Ÿ", new String(Character.toChars(376))},// 大文字Yウムラウト
        {"Α", new String(Character.toChars(913))},// 大文字アルファ
        {"α", new String(Character.toChars(945))},// 小文字アルファ
        {"Β", new String(Character.toChars(914))},// 大文字ベータ
        {"β", new String(Character.toChars(946))},// 小文字ベータ
        {"Γ", new String(Character.toChars(915))},// 大文字ガンマ
        {"γ", new String(Character.toChars(947))},// 小文字ガンマ
        {"Δ", new String(Character.toChars(916))},// 大文字デルタ
        {"δ", new String(Character.toChars(948))},// 小文字デルタ
        {"Ε", new String(Character.toChars(917))},// 大文字イプシロン
        {"ε", new String(Character.toChars(949))},// 小文字イプシロン
        {"Ζ", new String(Character.toChars(918))},// 大文字ゼータ
        {"ζ", new String(Character.toChars(950))},// 小文字ゼータ
        {"Η", new String(Character.toChars(919))},// 大文字エータ
        {"η", new String(Character.toChars(951))},// 小文字エータ
        {"Θ", new String(Character.toChars(920))},// 大文字シータ
        {"θ", new String(Character.toChars(952))},// 小文字シータ
        {"Ι", new String(Character.toChars(921))},// 大文字イオタ
        {"ι", new String(Character.toChars(953))},// 小文字イオタ
        {"Κ", new String(Character.toChars(922))},// 大文字カッパ
        {"κ", new String(Character.toChars(954))},// 小文字カッパ
        {"Λ", new String(Character.toChars(923))},// 大文字ラムダ
        {"λ", new String(Character.toChars(955))},// 小文字ラムダ
        {"Μ", new String(Character.toChars(924))},// 大文字ミュー
        {"μ", new String(Character.toChars(956))},// 小文字ミュー
        {"Ν", new String(Character.toChars(925))},// 大文字ニュー
        {"ν", new String(Character.toChars(957))},// 小文字ニュー
        {"Ξ", new String(Character.toChars(926))},// 大文字クサイ
        {"ξ", new String(Character.toChars(958))},// 小文字クサイ
        {"Ο", new String(Character.toChars(927))},// 大文字オミクロン
        {"ο", new String(Character.toChars(959))},// 小文字オミクロン
        {"Π", new String(Character.toChars(928))},// 大文字パイ
        {"π", new String(Character.toChars(960))},// 小文字パイ
        {"Ρ", new String(Character.toChars(929))},// 大文字ロー
        {"ρ", new String(Character.toChars(961))},// 小文字ロー
        {"Σ", new String(Character.toChars(931))},// 大文字シグマ
        {"σ", new String(Character.toChars(963))},// 小文字シグマ
        {"Τ", new String(Character.toChars(932))},// 大文字タウ
        {"τ", new String(Character.toChars(964))},// 小文字タウ
        {"Υ", new String(Character.toChars(933))},// 大文字ウプシロン
        {"υ", new String(Character.toChars(965))},// 小文字ウプシロン
        {"Φ", new String(Character.toChars(934))},// 大文字ファイ
        {"φ", new String(Character.toChars(966))},// 小文字ファイ
        {"Χ", new String(Character.toChars(935))},// 大文字カイ
        {"χ", new String(Character.toChars(967))},// 小文字カイ
        {"Ψ", new String(Character.toChars(936))},// 大文字プサイ
        {"ψ", new String(Character.toChars(968))},// 小文字プサイ
        {"Ω", new String(Character.toChars(937))},// 大文字オメガ
        {"ω", new String(Character.toChars(969))},// 小文字オメガ
        {"&", new String(Character.toChars(38))},// アンパサンド
        {"¦", new String(Character.toChars(166))},// 破断縦線
        {"µ", new String(Character.toChars(181))},// マイクロ記号
        {"‰", new String(Character.toChars(8240))},// パーミル
        {"¤", new String(Character.toChars(164))},// 一般通貨記号
        {"€", new String(Character.toChars(128))},// ユーロ記号
        {"¢", new String(Character.toChars(162))},// セント記号
        {"£", new String(Character.toChars(163))},// ポンド記号
        {"¥", new String(Character.toChars(165))},// 円記号
        {"©", new String(Character.toChars(169))},// 著作権記号
        {"®", new String(Character.toChars(174))},// 登録商標記号
        {"™", new String(Character.toChars(8482))},// 商標記号
        {"↑", new String(Character.toChars(8593))},// 上向き矢印
        {"→", new String(Character.toChars(8594))},// 右向き矢印
        {"↓", new String(Character.toChars(8595))},// 下向き矢印
        {"←", new String(Character.toChars(8592))},// 左向き矢印
        {"↔", new String(Character.toChars(8596))},// 左右両向き矢印
        {"⇑", new String(Character.toChars(8657))},// 上向き二重矢印
        {"⇒", new String(Character.toChars(8658))},// 右向き二重矢印
        {"⇓", new String(Character.toChars(8659))},// 下向き二重矢印
        {"⇐", new String(Character.toChars(8656))},// 左向き二重矢印
        {"⇔", new String(Character.toChars(8660))},// 左右両向き二重矢印
        {"♠", new String(Character.toChars(9824))},// スペードマーク
        {"♣", new String(Character.toChars(9827))},// クラブマーク
        {"♥", new String(Character.toChars(9829))},// ハートマーク
        {"♦", new String(Character.toChars(9830))},// ダイヤマーク
        {"ª", new String(Character.toChars(170))},// 女性序数標識
        {"º", new String(Character.toChars(186))},// 男性序数標識
        {"¹", new String(Character.toChars(185))},// 上付き1
        {"²", new String(Character.toChars(178))},// 上付き2
        {"³", new String(Character.toChars(179))},// 上付き3
        {"½", new String(Character.toChars(189))},// 2分の1
        {"¼", new String(Character.toChars(188))},// 4分の1
        {"¾", new String(Character.toChars(190))},// 4分の3
        {"·", new String(Character.toChars(183))},// 中点
        {"¡", new String(Character.toChars(161))},// 逆さ感嘆符
        {"¿", new String(Character.toChars(191))},// 逆さ疑問符
        {""", new String(Character.toChars(34))},// 引用符
        {"‘", new String(Character.toChars(8216))},// 左一重引用符
        {"’", new String(Character.toChars(8217))},// 右一重引用符
        {"“", new String(Character.toChars(8220))},// 左二重引用符
        {"”", new String(Character.toChars(8221))},// 右二重引用符
        {"«", new String(Character.toChars(171))},// 左二重角引用符
        {"»", new String(Character.toChars(187))},// 右二重角引用符
        {" ", new String(Character.toChars(160))},// 改行なし空白
        {" ", new String(Character.toChars(8195))},// “m”幅空白
        {" ", new String(Character.toChars(8194))},// “n”幅空白
        {" ", new String(Character.toChars(8201))},// 狭い空白
        {"—", new String(Character.toChars(8212))},// “m”幅ダッシュ
        {"–", new String(Character.toChars(8211))},// “n”幅ダッシュ
        {"­", new String(Character.toChars(173))},// ソフトハイフン
        {"•", new String(Character.toChars(8226))},// 行頭文字
        {"¶", new String(Character.toChars(182))},// 段落記号
        {"§", new String(Character.toChars(167))},// セクション記号
        {"†", new String(Character.toChars(8224))},// ダガー記号
        {"‡", new String(Character.toChars(8225))},// ダブルダガー記号
        {"…", new String(Character.toChars(8230))},// 省略記号
        {"◊", new String(Character.toChars(9674))},// 菱形
        {"∞", new String(Character.toChars(8734))},// 無限記号
        {"√", new String(Character.toChars(8730))},// 根号
        {"−", new String(Character.toChars(8722))},// マイナス
        {"±", new String(Character.toChars(177))},// プラスマイナス
        {"×", new String(Character.toChars(215))},// 乗算記号
        {"÷", new String(Character.toChars(247))},// 除算記号
        {"≠", new String(Character.toChars(8800))},// 等しくない
        {"≈", new String(Character.toChars(8776))},// ほぼ等しい
        {"≅", new String(Character.toChars(8773))},// およそ等しい
        {">", new String(Character.toChars(62))},// 大なり
        {"<", new String(Character.toChars(60))},// 小なり
        {"≥", new String(Character.toChars(8805))},// 大なりまたは等しい
        {"≤", new String(Character.toChars(8804))},// 小なりまたは等しい
        {"ƒ", new String(Character.toChars(402))},// 関数記号
        {"∝", new String(Character.toChars(8733))},// 比例する
        {"′", new String(Character.toChars(8242))},// プライム
        {"″", new String(Character.toChars(8243))},// 二重プライム
        {"∫", new String(Character.toChars(8747))},// 積分記号
        {"∂", new String(Character.toChars(8706))},// 偏微分
        {"∇", new String(Character.toChars(8711))},// ナブラ
        {"∑", new String(Character.toChars(8721))},// 数列の和
        {"∏", new String(Character.toChars(8719))},// 数列の積、直積
        {"ℑ", new String(Character.toChars(8465))},// 虚数
        {"ℜ", new String(Character.toChars(8476))},// 実数
        {"℘", new String(Character.toChars(8472))},// ワイエルシュトラスのP
        {"∼", new String(Character.toChars(8764))},// チルダ演算子
        {"∴", new String(Character.toChars(8756))},// 故に
        {"ϖ", new String(Character.toChars(982))},// パイ記号
        {"∠", new String(Character.toChars(8736))},// 角
        {"°", new String(Character.toChars(176))},// 度記号
        {"⊥", new String(Character.toChars(8869))},// 直交する
        {"≡", new String(Character.toChars(8801))},// 合同な
        {"¬", new String(Character.toChars(172))},// 否定記号
        {"∀", new String(Character.toChars(8704))},// 任意の
        {"∃", new String(Character.toChars(8707))},// 存在する
        {"∧", new String(Character.toChars(8743))},// 論理積
        {"∨", new String(Character.toChars(8744))},// 論理和
        {"∅", new String(Character.toChars(8709))},// 空集合
        {"∩", new String(Character.toChars(8745))},// 集合積
        {"∪", new String(Character.toChars(8746))},// 集合和
        {"∈", new String(Character.toChars(8712))},// ~の要素である
        {"∉", new String(Character.toChars(8713))},// ~の要素ではない
        {"∋", new String(Character.toChars(8715))},// ~を要素として含む
        {"⊂", new String(Character.toChars(8834))},// 含まれる
        {"⊃", new String(Character.toChars(8835))},// 含む
        {"⊄", new String(Character.toChars(8836))},// 含まれない
        {"⊆", new String(Character.toChars(8838))},// 含まれるか等しい
        {"⊇", new String(Character.toChars(8839))},// 含むか等しい
        {"⋅", new String(Character.toChars(8901))},// 点演算子
        {"∗", new String(Character.toChars(8727))},// アスタリスク演算子
        {"⊕", new String(Character.toChars(8853))},// 丸囲み加算(直和)
        {"⊗", new String(Character.toChars(8855))},// 丸囲み乗算(直積)
        {"⌈", new String(Character.toChars(8968))},// 左上限
        {"⌊", new String(Character.toChars(8970))},// 左下限
        {"⌉", new String(Character.toChars(8969))},// 右上限
        {"⌋", new String(Character.toChars(8971))},// 右下限
        {"´", new String(Character.toChars(180))},// アキュートアクセント
        {"¸", new String(Character.toChars(184))},// セディラ(セディーユ)
        {"ˆ", new String(Character.toChars(710))},// サーカムフレックス
        {"¯", new String(Character.toChars(175))},// マクロン
        {"˜", new String(Character.toChars(732))},// チルダ
        {"¨", new String(Character.toChars(168))},// ウムラウト(ダイエリシス)
        {"á", new String(Character.toChars(225))},// 小文字Aアキュート
        {"Á", new String(Character.toChars(193))},// 大文字Aアキュート
        {"â", new String(Character.toChars(226))},// 小文字Aサーカムフレックス
        {"Â", new String(Character.toChars(194))},// 大文字Aサーカムフレックス
        {"æ", new String(Character.toChars(230))},// 小文字AE合字(リガチャ)
        {"Æ", new String(Character.toChars(198))},// 大文字AE合字(リガチャ)
        {"à", new String(Character.toChars(224))},// 小文字Aグレーブ
        {"À", new String(Character.toChars(192))},// 大文字Aグレーブ
        {"å", new String(Character.toChars(229))},// 小文字Aリング
        {"Å", new String(Character.toChars(197))},// 大文字Aリング
        {"ã", new String(Character.toChars(227))},// 小文字Aチルダ
        {"Ã", new String(Character.toChars(195))},// 大文字Aチルダ
        {"ä", new String(Character.toChars(228))},// 小文字Aウムラウト
        {"Ä", new String(Character.toChars(196))},// 大文字Aウムラウト
        {"ç", new String(Character.toChars(231))},// 小文字Cセディラ
        {"Ç", new String(Character.toChars(199))},// 大文字Cセディラ
        {"é", new String(Character.toChars(233))},// 小文字Eアキュート
        {"É", new String(Character.toChars(201))},// 大文字Eアキュート
        {"ê", new String(Character.toChars(234))},// 小文字Eサーカムフレックス
        {"Ê", new String(Character.toChars(202))},// 大文字Eサーカムフレックス
        {"è", new String(Character.toChars(232))},// 小文字Eグレーブ
        {"È", new String(Character.toChars(200))},// 大文字Eグレーブ
        {"ð", new String(Character.toChars(240))},// 小文字Eth(アイスランド語)
        {"Ð", new String(Character.toChars(208))},// 大文字Eth(アイスランド語)
        {"ë", new String(Character.toChars(235))},// 小文字Eウムラウト
        {"Ë", new String(Character.toChars(203))},// 大文字Eウムラウト
        {"í", new String(Character.toChars(237))},// 小文字Iアキュート
        {"Í", new String(Character.toChars(205))},// 大文字Iアキュート
        {"î", new String(Character.toChars(238))},// 小文字Iサーカムフレックス
        {"Î", new String(Character.toChars(206))},// 大文字Iサーカムフレックス
        {"ì", new String(Character.toChars(236))},// 小文字Iグレーブ
        {"Ì", new String(Character.toChars(204))},// 大文字Iグレーブ
        {"ï", new String(Character.toChars(239))},// 小文字Iウムラウト
        {"Ï", new String(Character.toChars(207))},// 大文字Iウムラウト
        {"ñ", new String(Character.toChars(241))},// 小文字Nチルダ
        {"Ñ", new String(Character.toChars(209))},// 大文字Nチルダ
        {"ó", new String(Character.toChars(243))},// 小文字Oアキュート
        {"Ó", new String(Character.toChars(211))},// 大文字Oアキュート
        {"ô", new String(Character.toChars(244))},// 小文字Oサーカムフレックス
        {"Ô", new String(Character.toChars(212))},// 大文字Oサーカムフレックス
        {"ò", new String(Character.toChars(242))},// 小文字Oグレーブ
        {"Ò", new String(Character.toChars(210))},// 大文字Oグレーブ
        {"ø", new String(Character.toChars(248))},// 小文字Oスラッシュ
        {"Ø", new String(Character.toChars(216))},// 大文字Oスラッシュ
        {"õ", new String(Character.toChars(245))},// 小文字Oチルダ
        {"Õ", new String(Character.toChars(213))},// 大文字Oチルダ
        {"ö", new String(Character.toChars(246))},// 小文字Oウムラウト
        {"Ö", new String(Character.toChars(214))},// 大文字Oウムラウト
        {"œ", new String(Character.toChars(339))},// 小文字OE合字(リガチャ)
        {"Œ", new String(Character.toChars(338))},// 大文字OE合字(リガチャ)
        {"ß", new String(Character.toChars(223))},// エスツェット(ドイツ語)
        {"š", new String(Character.toChars(353))},// 小文字Sキャロン(ハーチェク)
        {"Š", new String(Character.toChars(352))},// 大文字Sキャロン(ハーチェク)
        {"þ", new String(Character.toChars(254))},// 小文字Thorn(アイスランド語)
        {"Þ", new String(Character.toChars(222))},// 大文字Thorn(アイスランド語)
        {"ú", new String(Character.toChars(250))},// 小文字Uアキュート
        {"Ú", new String(Character.toChars(218))},// 大文字Uアキュート
        {"û", new String(Character.toChars(251))},// 小文字Uサーカムフレックス
        {"Û", new String(Character.toChars(219))},// 大文字Uサーカムフレックス
        {"ù", new String(Character.toChars(249))},// 小文字Uグレーブ
        {"Ù", new String(Character.toChars(217))},// 大文字Uグレーブ
        {"ü", new String(Character.toChars(252))},// 小文字Uウムラウト
        {"Ü", new String(Character.toChars(220))},// 大文字Uウムラウト
        {"ý", new String(Character.toChars(253))},// 小文字Yアキュート
        {"Ý", new String(Character.toChars(221))},// 大文字Yアキュート
        {"ÿ", new String(Character.toChars(255))},// 小文字Yウムラウト
        {"Ÿ", new String(Character.toChars(376))},// 大文字Yウムラウト
        {"Α", new String(Character.toChars(913))},// 大文字アルファ
        {"α", new String(Character.toChars(945))},// 小文字アルファ
        {"Β", new String(Character.toChars(914))},// 大文字ベータ
        {"β", new String(Character.toChars(946))},// 小文字ベータ
        {"Γ", new String(Character.toChars(915))},// 大文字ガンマ
        {"γ", new String(Character.toChars(947))},// 小文字ガンマ
        {"Δ", new String(Character.toChars(916))},// 大文字デルタ
        {"δ", new String(Character.toChars(948))},// 小文字デルタ
        {"Ε", new String(Character.toChars(917))},// 大文字イプシロン
        {"ε", new String(Character.toChars(949))},// 小文字イプシロン
        {"Ζ", new String(Character.toChars(918))},// 大文字ゼータ
        {"ζ", new String(Character.toChars(950))},// 小文字ゼータ
        {"Η", new String(Character.toChars(919))},// 大文字エータ
        {"η", new String(Character.toChars(951))},// 小文字エータ
        {"Θ", new String(Character.toChars(920))},// 大文字シータ
        {"θ", new String(Character.toChars(952))},// 小文字シータ
        {"Ι", new String(Character.toChars(921))},// 大文字イオタ
        {"ι", new String(Character.toChars(953))},// 小文字イオタ
        {"Κ", new String(Character.toChars(922))},// 大文字カッパ
        {"κ", new String(Character.toChars(954))},// 小文字カッパ
        {"Λ", new String(Character.toChars(923))},// 大文字ラムダ
        {"λ", new String(Character.toChars(955))},// 小文字ラムダ
        {"Μ", new String(Character.toChars(924))},// 大文字ミュー
        {"μ", new String(Character.toChars(956))},// 小文字ミュー
        {"Ν", new String(Character.toChars(925))},// 大文字ニュー
        {"ν", new String(Character.toChars(957))},// 小文字ニュー
        {"Ξ", new String(Character.toChars(926))},// 大文字クサイ
        {"ξ", new String(Character.toChars(958))},// 小文字クサイ
        {"Ο", new String(Character.toChars(927))},// 大文字オミクロン
        {"ο", new String(Character.toChars(959))},// 小文字オミクロン
        {"Π", new String(Character.toChars(928))},// 大文字パイ
        {"π", new String(Character.toChars(960))},// 小文字パイ
        {"Ρ", new String(Character.toChars(929))},// 大文字ロー
        {"ρ", new String(Character.toChars(961))},// 小文字ロー
        {"Σ", new String(Character.toChars(931))},// 大文字シグマ
        {"σ", new String(Character.toChars(963))},// 小文字シグマ
        {"Τ", new String(Character.toChars(932))},// 大文字タウ
        {"τ", new String(Character.toChars(964))},// 小文字タウ
        {"Υ", new String(Character.toChars(933))},// 大文字ウプシロン
        {"υ", new String(Character.toChars(965))},// 小文字ウプシロン
        {"Φ", new String(Character.toChars(934))},// 大文字ファイ
        {"φ", new String(Character.toChars(966))},// 小文字ファイ
        {"Χ", new String(Character.toChars(935))},// 大文字カイ
        {"χ", new String(Character.toChars(967))},// 小文字カイ
        {"Ψ", new String(Character.toChars(936))},// 大文字プサイ
        {"ψ", new String(Character.toChars(968))},// 小文字プサイ
        {"Ω", new String(Character.toChars(937))},// 大文字オメガ
        {"ω", new String(Character.toChars(969))},// 小文字オメガ
    };

    
    public String replace(String s) {
        String result = s;
        for (int i = 0; i < htmlString.length; i++) {
            result = result.replaceAll(htmlString[i][0], htmlString[i][1]);
        }
        return result;
    }
    
    private void test() {
        for (int i = 0; i < htmlString.length; i++) {
            System.out.println(htmlString[i][1]);
        }

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        HtmlSpecialChar s = new HtmlSpecialChar();
        s.test();
        String a = "&divide;aabbcc&#969;ddeef&divide;adfa\n&divide;aabbcc&#969;ddeefadfa\n&divide;aabbcc&#969;ddeefadfa";
        System.out.println(s.replace(a));
    }
}

Fri Feb 8 2013 13:41:04 | 未分類 | No Comments »

2013年の六曜CSVデーター

間違いがあるかもしれませんので、ご利用の際には各自ご確認ください。
またご連絡いただけると助かります。
文字コードはshift-jis
2013_rokuyo_holiday.csv

Sat Dec 15 2012 17:20:15 | Download | No Comments »

How to published local wordpress site to Internet

Have to rewrite redirect canonical url, and rewrite ip-address.
Can be anyway…

1. Edit: wp-content/plugins/obbuffer/functions.php.
2. Edit: wp-includes/functions.php, add code 3 lines.
3. Upload these files.
4. activate obbuffer plugin.

obbuffer_plugin_wordpress

ローカルなWordPressサイトをインターネットに公開したかったのですが、
簡単にはいきません。
とりあえずこんな方法で実現できましたが。
問題が色々あると思われます。

Thu May 3 2012 14:05:44 | Wordpress | No Comments »

Display Realname and email on Roundcube webmail 0.7.2

patch: roundcube2.patch

Roundcube にユーザーの表示名とメールアドレスを表示したかったのですが、
どうやったらいいか分からない。
正式にサポートされた方法があるんでしょうか?

Thu May 3 2012 13:31:52 | php | No Comments »

2012年の六曜、祝祭日 CSVデーター

間違いがあるかもしれませんので、ご利用の際には各自ご確認ください。
またご連絡いただけると助かります。
文字コードはshift-jis
2012_rokuyo_holiday.csv

Wed Nov 30 2011 11:10:16 | Download and Ec3popupinfo | No Comments »

年月日入力の View Helper

年月日入力の View Helper を試しに作成してみた。不完全かも。
ネット等でいろいろ調べたりして作成しのだけれどネット情報が意外と少なかった。

<?php

/**
 * Abstract class for extension
 */
require_once 'Zend/View/Helper/FormElement.php';

/**
 * Helper to generate a "DbDatetime" element
 *
 */
class View_Helper_FormDbDatetime extends Zend_View_Helper_FormElement {

    /**
     *
     */
    public function formDbDatetime($name, $value = null, $attribs = null) {

        $info = $this->_getInfo($name, $value, $attribs);
        extract($info); // name, value, attribs, options, listsep, disable
        // build the element
        $disabled = '';
        if ($disable) {
            // disabled
            $disabled = ' disabled="disabled"';
        }

        $codeLength = array(
            'year' => 4,
            'month' => 2,
            'day' => 2,
            'hour' => 2,
            'minutes' => 2,
            'seconds' => 2
        );


        if (isset($attribs['separator'])) {
            $separator = $attribs['separator'];
            unset($attribs['separator']);
        }

        // XHTML or HTML end tag?
        $endTag = ' />';
        if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
            $endTag = '>';
        }

        if (array_key_exists('class', $attribs)) {
            $class = ' class="' . $attribs['class'] . '"';
        } else {
            $class = '';
        }

        $datetime = $this->view->escape($value);
        //echo $datetime;
        if (preg_match('/[0-9]{4}\-[0-9]{2}\-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/', $datetime)) {
            list($year, $month, $day, $hour, $minutes, $seconds) = preg_split('/[\-\ \:]/', $datetime);
            if ($year < 2000)
                $year = '0000';
            if ($month < 1 || $month > 12)
                $month = '00';
            if ($hour < 0 || $hour > 23)
                $hour = '00';
            if ($minutes < 0 || $minutes > 59)
                $minutes = '00';
            if ($seconds < 0 || $seconds > 59)
                $seconds = '00';
        } else if (array_key_exists('today', $attribs)) {
            $today = getdate();
            //print("$today[year]年$today[mon]月$today[mday]日<br>\n");
            $year = $today['year'];
            $month = $today['mon'];
            $day = $today['mday'];
            $hour = $today['hours'];
            $minutes = $today['minutes'];
            $seconds = $today['seconds'];
        } else {
            $year = '';
            $month = '';
            $day = '';
            $hour = '';
            $minutes = '';
            $seconds = '';
        }
        $attribs['class'] = "$class datetime";

        $xhtml = $separator['before'] . '<input type="text"'
                . ' name="' . $this->getHtmlAttribsName($this->view->escape($name), '_year') . '"'
                . ' id="' . $this->view->escape($id) . '_year"'
                . ' value="' . substr($year, 0, $codeLength['year']) . '"'
                . ' size="' . $codeLength['year'] . '"'
                . ' maxlength="' . $codeLength['year'] . '"'
                . $disabled
                . $this->_htmlAttribs($attribs)
                . $endTag . $separator['year'];

        // Print the field for Operator code
        $attribs['class'] = "$class datetime_operator";

        $xhtml .= '<input type="text"'
                . ' name="' . $this->getHtmlAttribsName($this->view->escape($name), '_month') . '"'
                . ' id="' . $this->view->escape($id) . '_month"'
                . ' value="' . substr($month, 0, $codeLength['month']) . '"'
                . ' size="' . $codeLength['month'] . '"'
                . ' maxlength="' . $codeLength['month'] . '"'
                . $disabled
                . $this->_htmlAttribs($attribs)
                . $endTag . $separator['month'];

        $attribs['class'] = "$class datetime";

        $xhtml .= '<input type="text"'
                . ' name="' . $this->getHtmlAttribsName($this->view->escape($name), '_day') . '"'
                . ' id="' . $this->view->escape($id) . '_day"'
                . ' value="' . substr($day, 0, $codeLength['day']) . '"'
                . ' size="' . $codeLength['day'] . '"'
                . ' maxlength="' . $codeLength['day'] . '"'
                . $disabled
                . $this->_htmlAttribs($attribs)
                . $endTag . $separator['day'];

        $attribs['class'] = "$class datetime";

        $xhtml .= '<input type="text"'
                . ' name="' . $this->getHtmlAttribsName($this->view->escape($name), '_hour') . '"'
                . ' id="' . $this->view->escape($id) . '_hour"'
                . ' value="' . substr($hour, 0, $codeLength['hour']) . '"'
                . ' size="' . $codeLength['hour'] . '"'
                . ' maxlength="' . $codeLength['hour'] . '"'
                . $disabled
                . $this->_htmlAttribs($attribs)
                . $endTag . $separator['hour'];

        $attribs['class'] = "$class datetime";

        $xhtml .= '<input type="text"'
                . ' name="' . $this->getHtmlAttribsName($this->view->escape($name), '_minutes') . '"'
                . ' id="' . $this->view->escape($id) . '_minutes"'
                . ' value="' . substr($minutes, 0, $codeLength['minutes']) . '"'
                . ' size="' . $codeLength['minutes'] . '"'
                . ' maxlength="' . $codeLength['minutes'] . '"'
                . $disabled
                . $this->_htmlAttribs($attribs)
                . $endTag . $separator['minutes'];

        $xhtml .= $separator['after'];
        return $xhtml;
    }

    private function getHtmlAttribsName($name, $key) {
        if (preg_match('/\]$/', $name)) {
            return preg_replace('/\]$/', $key . ']', $name);
        } else {
            return $name . $key;
        }
    }

}


Thu Nov 3 2011 12:03:24 | Zend Framework | No Comments »

Cf Shopping Cart

» Cf Shopping Cart page is here! icon_idea.gif

Cf Shopping Cart is simple shopping cart plugin for WordPress.
This plugin be working with Custom Field and more plugins.
Thereby website can have flexible design.
Can manage stock. Can use select to option different types of products, these can have extra charge or discount.
Can set shipping. Support PayPal payment.


Ads:

Thu Sep 1 2011 11:39:52 | Cf Shopping Cart | 16 Comments »

My Category Order plugin

http://wordpress.org/extend/plugins/my-category-order/

カテゴリーの並び順を変更できる使いやすいすばらしいプラグインです。
このプラグインはワードプレスのデーターベースのテープルにフィールドを追加して動作します。

このプラグインによって並べ替えたカテゴリーを自力でループしてみます。
今回は親と子の階層は1段階のみです。
function.php に追加して使用してみます。

function my_category_order_loop($args) {
    global $wpdb;

    $parent_category = $args['id'];
    $data = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->term_taxonomy, $wpdb->terms WHERE parent = %d and wp_terms.term_id = wp_term_taxonomy.term_id order by term_order;", $parent_category), ARRAY_A);
    //print_r($data);
    if ($wpdb->last_error) {
        print "<p>" . $wpdb->last_error . "</p>";
    }

    // my category loop
    foreach ($data as $index => $record) {
        $r[] = '<a ' . $class . ' href="' . get_category_link($record['term_taxonomy_id']) . '">' . $record['name'] . '</a>';
    }
    return join(' | ', $r);
}
add_shortcode('my_category_order_loop', 'my_category_order_loop');

Thu Jun 23 2011 17:18:11 | Wordpress | No Comments »

ギャラリー表示作成, make photo gallery

↓こういう画像表示をつくってみる。覚書。
↓情報をテーブル表示、上に大きな画像、下にサムネイル、サムネイルをクリックすると大きく表示。

Name Test Name
Date 2011-06-03
Others hogehoge
DSCF0002

DSCF0002 DSCF0007 DSCF0010


Custom Field Template と Exec-PHP プラグインをインストールしアクティブにする。
下記のテンプレート設定をする。

[Name]
type = text
size = 35
[Date]
type = text
size = 35
[Others]
type = text
size = 35
[img1]
type = file
[img2]
type = file
[img3]
type = file

テーマの footer.php に下記の Javascript を追加

<script type="text/javascript"> 
//<![CDATA[
jQuery(document).ready(function() {
  //alert('a');
  jQuery('span.thumb').click(function () {
    var href = jQuery(this).attr("href");
    //alert(href);
    jQuery('.large_img > img').attr("src", href);
    return false;
  });
});
//]]>
</script> 


テーマの function.php に下記のコードを追加
ショートコードにすると使いやすいかも。

function img_cf() {
    global $post;
    $html = '';

    $la = array('Name', 'Date', 'Others');
    $tl = '<table>';
    foreach ($la as $i => $s) {
        $m = get_post_meta($post->ID, $s,true);
        $tl .= "<tr><td>$s</td><td>$m</td></tr>";
    }
    $tl .= '</table>';
    
    $be = array();
    $first = '';
    for ($i = 1; $i <= 8; $i++) {
        $cfkey = 'img' . $i;
        $m = get_post_meta($post->ID,$cfkey,true);
        if ($m) {
            $be[] = '<span class="thumb" href="' . wp_get_attachment_url($m,'medium') . '">' . wp_get_attachment_image($m,'thumbnail') . '</a>';
            if (!$first) {
                $first = '<div class="large_img">' . wp_get_attachment_image($m,'medium') . '</div><br />';
            }
        }
    }
    
    if ($be) {
        $img .= '<div class="be_block">' . join(' ', $be) . '</div>';
    }
    
    return $tl . $first . $img;
}


下記のコードを投稿に埋め込む
<?php echo img_cf(); ?>
css で位置を固定して、
完了
いろいろ応用できそう。

Eventually, this function has been become plugin.
Cf Image Gallery plugin: http://wordpress.org/extend/plugins/cf-image-gallery/

結局、プラグインにした。



Fri Jun 3 2011 12:05:36 | Wordpress | No Comments »

Ec3popupinfo plugin for WordPress

Description

Ec3popupinfo is a plugin that is popup day information on mouse over the event-calendar plugin widget.

Installation

1. Install and Settings event-calendar plugin. http://wordpress.org/extend/plugins/event-calendar/
2. Install and activate the plugin.
3. Visit Settings Ec3popupinfo.
4. Input data, and save.

Screen shot

概要

Ec3popupinfo プラグインはイベントカレンダープラグイン上に祝祭日や暦などをポップアップ表示するものです。

右サイドバーのイベントカレンダーがデモになっています。(祝祭日と六曜表示)

Download from WordPress.org

Ec3popupinfo

Tue Jan 11 2011 10:50:33 | Ec3popupinfo | No Comments »