Skip to content

Instantly share code, notes, and snippets.

@cyanglee
Created July 4, 2011 20:11
Show Gist options
  • Save cyanglee/1063869 to your computer and use it in GitHub Desktop.
Save cyanglee/1063869 to your computer and use it in GitHub Desktop.
Unicode in Rails
# coding: utf-8
module ApplicationHelper
def cities_helper
[
['基隆市', '基隆市'],
['台北市', '台北市'],
['新北市', '新北市'],
['桃園縣', '桃園縣'],
['新竹市', '新竹市'],
['新竹縣', '新竹縣'],
['苗栗縣', '苗栗縣'],
['台中市', '台中市'],
['彰化縣', '彰化縣'],
['南投縣', '南投縣'],
['雲林縣', '雲林縣'],
['嘉義市', '嘉義市'],
['嘉義縣', '嘉義縣'],
['台南市', '台南市'],
['高雄市', '高雄市'],
['屏東縣', '屏東縣'],
['台東縣', '台東縣'],
['花蓮縣', '花蓮縣'],
['宜蘭縣', '宜蘭縣'],
['澎湖縣', '澎湖縣'],
['金門縣', '金門縣'],
['連江縣', '連江縣']
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment