Skip to content

Menu

  • About me
  • my github

tom's blog

some thoughts…

normalize UTF8 (translit/deaccent)

March 22, 2009February 16, 2013 by Tom

place this in your application.rb (eg)

class String
  def translit
    Unicode.normalize_KD(self).unpack('U*').select{ |cp| cp < 127 }.pack('U*').gsub(/ /,'-').downcase
  end
end
Posted in programming, ruby/railsTagged programming, rails, ruby, utf8

Post navigation

Olejová bábovka
add czech pluralize to i18n

Tags

afnetwork ambari bash bcd c++ CacheLoader car cluster digest dovecot dum projekt stavba flowers gem hadoop i18n imaps iPhone linux mailserver nfs pantyhose privileges programming pspdfkit pxe rails raspberry redis redis failover repair ruby rubymotion rubymotion md5 sentinel sha1 ssl trip tulips turbo UIImageView unix vinohrad víno windows winmagic

Categories

  • 1 (1)
  • bike (3)
  • cooking (14)
  • embedded (1)
  • flying (8)
    • Heli (2)
    • plastics (3)
  • General (1)
  • hadoop (1)
  • hardware (2)
  • movies (1)
  • můj dům, můj hrad (13)
    • inteligentní dům (5)
      • Foxtrot (1)
    • projekt (1)
    • úředničina (4)
  • mysql (1)
  • nodemcu (2)
  • other stuffs (4)
    • pantyhose (4)
  • photo (15)
  • press (4)
  • programming (63)
    • c++ (1)
    • iPhone (4)
    • logo (msw/fms) (1)
    • lua (3)
    • MCU (2)
    • palm (6)
    • R (2)
    • ruby/rails (27)
    • rubymotion (9)
  • rhino3d (2)
  • Smoothie (1)
  • trips (5)
  • tutorials (7)
    • ruby (7)
  • unix (17)
  • unsortables (30)
  • Vinohrad (1)
Powered by WordPress. Landscape by Diverse Themes.