• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            兔子的技術博客

            兔子

               :: 首頁 :: 聯系 :: 聚合  :: 管理
              202 Posts :: 0 Stories :: 43 Comments :: 0 Trackbacks

            留言簿(10)

            最新評論

            閱讀排行榜

            評論排行榜

            問題就是我們使用TextMate不支持GB2312等編碼,用著及其不方便,下面是解決方案: 

            打開Bundle Editor 
            選則Show all 
            選則文件夾TextMate(或者隨便你選則什么) 
            增加一個新的template‘openEncodedFile’(或者隨便你自己命名) 
            在Template data中如下設定 
            Extension:中 留空 
            Command(s):
            # open CocoaDialog's file select menu
            file=$(CocoaDialog fileselect \
                    --title "Open an encoded file" \
                    --with-directory $HOME/ \
            )
            # check for valid file
            if [ -n "$file" ]; then
            # open CocoaDialog's dropdown menu
            # for more encodings add them to '--items'
            # to list all possibile encodings use the Terminal with 'iconv -l'

                    res=$(CocoaDialog dropdown \
                            --title "Open an encoded file" \
                            --text "Choose the encoding:" \
                            ??exit?onchange \
                            --button1 "Open" \
                            --button2 "Cancel" \
                            --items "BIG5" "EUC-TW" "GB2312" "SJIS" "EUC-JP" "KOI8-R" \
                    )
            # if user canceled exit
                    [[ $( (tail -r <<<"$res") | tail -n1)  == "2" ]] && \
                            exit_discard
                    res=$(tail -n1 <<<"$res")
            # add more 'elif' according to '--items' if needed
                    if [ "$res" == 0 ]; then
                            ENC="BIG5"
                    elif [ "$res" == 1 ]; then
                            ENC="EUC-TW"
                    elif [ "$res" == 2 ]; then
                            ENC="GB2312"
                    elif [ "$res" == 3 ]; then
                            ENC="SJIS"
                    elif [ "$res" == 4 ]; then
                            ENC="EUC-JP"
                    elif [ "$res" == 5 ]; then
                            ENC="KOI8-R"
                    fi
            # start conversion to UTF-8 and send the result as a new file back to TM
                    iconv -f "$ENC" -t utf-8 "$file" > "$TM_NEW_FILE"
            fi
            Output: Insert as Text 
            - Activation: Key Equivalent shift+option+o (我的建議) 
            - Scope: 留空
            posted on 2012-02-04 14:58 會飛的兔子 閱讀(503) 評論(0)  編輯 收藏 引用 所屬分類: 蘋果相關
            久久综合鬼色88久久精品综合自在自线噜噜 | 很黄很污的网站久久mimi色| 国产精品久久久久久| 97久久精品无码一区二区天美| 精品综合久久久久久97超人| 精品久久久久中文字| 久久久久久久91精品免费观看 | 国产精品久久久久久影院| 国产三级观看久久| 国内精品综合久久久40p| 久久A级毛片免费观看| 精品久久久久久无码免费| 一本久久a久久精品vr综合| 亚洲综合精品香蕉久久网97| 狠狠色综合网站久久久久久久高清 | 久久国产免费直播| 国产精品亚洲美女久久久| 精品国产99久久久久久麻豆| 久久国产亚洲精品麻豆| 久久久一本精品99久久精品88| 97久久精品人妻人人搡人人玩 | 国产一级持黄大片99久久| 久久亚洲精品国产精品婷婷| 丰满少妇人妻久久久久久4| 亚洲中文久久精品无码ww16| 久久久久久毛片免费看| 色欲综合久久躁天天躁蜜桃| 欧美午夜精品久久久久久浪潮| 久久精品亚洲一区二区三区浴池| 亚洲国产精品综合久久一线| 精品久久人人做人人爽综合| 久久久精品人妻一区二区三区四| 国产成人久久精品一区二区三区| 国产亚洲成人久久| 91精品国产91热久久久久福利| 久久久久久久久久久久久久| 人人狠狠综合88综合久久| 91精品国产色综久久 | 国产精品综合久久第一页| 国产成人久久777777| 久久久久四虎国产精品|