• <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 會飛的兔子 閱讀(496) 評論(0)  編輯 收藏 引用 所屬分類: 蘋果相關
            人人妻久久人人澡人人爽人人精品 | 亚洲中文字幕无码久久精品1| 国产精品成人99久久久久| 青青国产成人久久91网| 久久这里只有精品视频99| 要久久爱在线免费观看| 国产精品久久久亚洲| 品成人欧美大片久久国产欧美...| 久久91精品国产91久| 99久久精品国产麻豆| 久久综合久久鬼色| 久久精品蜜芽亚洲国产AV| 久久伊人影视| 99久久人人爽亚洲精品美女| 日韩人妻无码精品久久免费一| av无码久久久久不卡免费网站| 久久亚洲国产欧洲精品一| 久久国产精品一区| 国产精品9999久久久久| 中文精品久久久久人妻| 精品久久久久久无码国产| 久久精品国产亚洲av麻豆色欲| 亚洲午夜精品久久久久久浪潮| 久久精品国产一区| 久久精品中文闷骚内射| 亚洲国产精品18久久久久久| 国产高清国内精品福利99久久| 精品久久无码中文字幕| 日韩亚洲国产综合久久久| 99久久精品国产综合一区| 久久精品国产精品亚洲毛片| 少妇高潮惨叫久久久久久| 亚洲乱码精品久久久久.. | 免费精品久久天干天干| 久久久久国产亚洲AV麻豆| 66精品综合久久久久久久| 久久精品国产91久久综合麻豆自制 | 青青国产成人久久91网| 精品久久久久久综合日本| 国产精品久久久久9999| 久久国产精品久久精品国产|