2008-09-21 11:21:30 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
require 'active_support/multibyte/chars'
|
|
|
|
require 'active_support/multibyte/exceptions'
|
|
|
|
require 'active_support/multibyte/unicode_database'
|
|
|
|
|
|
|
|
module ActiveSupport #:nodoc:
|
2008-09-21 11:28:05 -04:00
|
|
|
module Multibyte
|
2008-09-21 11:21:30 -04:00
|
|
|
# A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more
|
|
|
|
# information about normalization.
|
2008-10-06 13:42:51 -04:00
|
|
|
NORMALIZATION_FORMS = [:c, :kc, :d, :kd]
|
2006-10-03 19:45:32 -04:00
|
|
|
|
2008-09-21 11:21:30 -04:00
|
|
|
# The Unicode version that is supported by the implementation
|
|
|
|
UNICODE_VERSION = '5.1.0'
|
|
|
|
|
|
|
|
# The default normalization used for operations that require normalization. It can be set to any of the
|
2008-10-06 13:42:51 -04:00
|
|
|
# normalizations in NORMALIZATION_FORMS.
|
2008-09-21 11:21:30 -04:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# ActiveSupport::Multibyte.default_normalization_form = :c
|
|
|
|
mattr_accessor :default_normalization_form
|
|
|
|
self.default_normalization_form = :kc
|
|
|
|
|
|
|
|
# The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy
|
|
|
|
# class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for
|
|
|
|
# an example how to do this.
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# ActiveSupport::Multibyte.proxy_class = CharsForUTF32
|
|
|
|
mattr_accessor :proxy_class
|
|
|
|
self.proxy_class = ActiveSupport::Multibyte::Chars
|
|
|
|
end
|
2008-09-21 11:28:05 -04:00
|
|
|
end
|