• <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)  編輯 收藏 引用 所屬分類: 蘋果相關
            69久久精品无码一区二区| 亚洲精品美女久久777777| 一本久久a久久精品综合夜夜| 久久久久亚洲av无码专区导航 | 2021少妇久久久久久久久久| 久久99精品国产| 伊人久久一区二区三区无码| 99久久无色码中文字幕人妻| 久久精品一区二区三区不卡| 久久精品国产国产精品四凭| 国产成人精品三上悠亚久久| 欧美激情精品久久久久| 综合人妻久久一区二区精品| 一级做a爱片久久毛片| 久久99精品久久久大学生| 国产日韩久久免费影院| 欧美熟妇另类久久久久久不卡| 精品久久久久久无码免费| 久久九九精品99国产精品| 无码乱码观看精品久久| 国产成人精品久久亚洲| 久久精品国产精品亚洲毛片| 久久青青草视频| 久久亚洲天堂| 亚洲AⅤ优女AV综合久久久| 久久久久国产精品| 国内精品久久久人妻中文字幕| 欧美日韩精品久久久免费观看| 品成人欧美大片久久国产欧美...| 久久综合综合久久综合| 久久综合久久美利坚合众国| 久久婷婷五月综合色99啪ak| 99久久国产热无码精品免费久久久久| 色偷偷久久一区二区三区| 无码人妻久久一区二区三区蜜桃 | 久久国产成人| 久久福利片| 久久亚洲国产精品成人AV秋霞| 欧美久久久久久精选9999| 日本久久中文字幕| 色天使久久综合网天天|