chusiang / tuxENV

my dotfiles for Linux and macOS console environment (bash, tmux, vim like ...)
http://note.drx.tw
MIT License
15 stars 2 forks source link

Fix unicode issue under macOS x iTerm2 #8

Closed chusiang closed 8 years ago

chusiang commented 8 years ago

2016.08.01 拿到新 MacBook Pro 時發現 sdcv 查詢出來的結果會用 unicode 的方式呈現,不太正常,原來是因為 stardict 附的字典是使用 Big5 的關係,只需在 sdcv 後代上 --utf8-output 的參數即可解決。


  1. Enviroment:
    • macOS v10.11.6
    • iTerm2 v3.0.7
  2. 比較一下有無使用 --utf8-output 參數的差別。

    $ sdcv penguin
    Found 1 items, similar to penguin.
    -->\u725b\u6d25\u73fe\u4ee3\u82f1\u6f22\u96d9\u89e3\u8a5e\u5178
    -->penguin
    
    / 5peNgwIn; `pZN^wIn/ n black and white sea-bird living in the Antarctic, with webbed feet and wings like flippers that are used for swimming \u4f01\u9d5d.
    
    $ sdcv --utf8-output penguin
    Found 1 items, similar to penguin.
    -->牛津現代英漢雙解詞典
    -->penguin
    
    / 5peNgwIn; `pZN^wIn/ n black and white sea-bird living in the Antarctic, with webbed feet and wings like flippers that are used for swimming 企鵝.
  3. 附上截圖。

    2016-08-15-sdcv-unicode-and-big5

    Reference

chusiang commented 8 years ago

已於 37b3fd6 解決。