<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,7 +23,8 @@ module LocalizedCountrySelect
     # Returns array with codes and localized country names (according to &lt;tt&gt;I18n.locale&lt;/tt&gt;)
     # for &lt;tt&gt;&lt;option&gt;&lt;/tt&gt; tags
     def localized_countries_array
-      I18n.translate(:countries).map { |key, value| [value, key.to_s.upcase] }.sort
+      I18n.translate(:countries).map { |key, value| [value, key.to_s.upcase] }.
+                                 sort_by { |country| country.first.parameterize }
     end
     # Return array with codes and localized country names for array of country codes passed as argument
     # == Example</diff>
      <filename>lib/localized_country_select.rb</filename>
    </modified>
    <modified>
      <diff>@@ -95,6 +95,11 @@ class LocalizedCountrySelectTest &lt; Test::Unit::TestCase
     assert_equal [ ['United States', 'US'], ['Canada', 'CA'] ], LocalizedCountrySelect::priority_countries_array([:us, :ca])
   end
 
+  def test_should_list_countries_with_accented_names_in_correct_order
+    I18n.locale = 'cz'
+    assert_match Regexp.new(Regexp.escape(%Q{&lt;option value=&quot;BI&quot;&gt;Burundi&lt;/option&gt;\n&lt;option value=&quot;TD&quot;&gt;&#268;ad&lt;/option&gt;})), localized_country_select(:user, :country)
+  end
+
   private
 
   def setup</diff>
      <filename>test/localized_country_select_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c96ea301df65b75df141a71d612df022dc4a7067</id>
    </parent>
  </parents>
  <author>
    <name>Karel Minarik</name>
    <email>karmi@karmi.cz</email>
  </author>
  <url>http://github.com/karmi/localized_country_select/commit/ca5ccd1821a5059bb69afe1ad8ba5b03710f34e5</url>
  <id>ca5ccd1821a5059bb69afe1ad8ba5b03710f34e5</id>
  <committed-date>2009-09-30T02:50:46-07:00</committed-date>
  <authored-date>2009-09-30T02:50:46-07:00</authored-date>
  <message>FIX that countries beginning with accented characters (&#196;gyptien, &#352;pan&#283;lsko, etc) are listed in correct order, not at the end of the list</message>
  <tree>0725a052fe39e7c282c747a4c464b265a1db2ab3</tree>
  <committer>
    <name>Karel Minarik</name>
    <email>karmi@karmi.cz</email>
  </committer>
</commit>
