Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ninjudd-unicode_collation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ninjudd-unicode_collation

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Unicode Collation

Unicode sorting is complicated (http://unicode.org/reports/tr10/), and Ruby doesn't do it correctly. But there is a widely-used implementation of the Unicode collation algorithm in the ICU (International Components for Unicode) libraries. This gem is a simple C wrapper to add the ucol_getSortKey function from the ICU Collation API to Ruby Strings.

== Usage:

['cafe', 'cafes', 'caf.A��'].sort => ['cafe', 'cafes', 'caf��']

require 'unicode_collation'

['cafe', 'cafes', 'caf��'].sort_by {|s| s.unicode_sort_key} => ['cafe', 'caf��', 'cafes']

== Install:

You must install ICU first. You can download the source from http://site.icu-project.org/download, or on Mac, you can install with MacPorts:

sudo port install icu

sudo gem install ninjudd-unicode-collation -s http://gems.github.com

== To do:

Add support for locales other than en-US.

== License:

Copyright (c) 2009 Justin Balthrop, Geni.com; Published under The MIT License, see LICENSE

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc