aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb')
-rw-r--r--activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb b/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb
new file mode 100644
index 0000000000..b28e345585
--- /dev/null
+++ b/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb
@@ -0,0 +1,9 @@
+# Chars uses this handler when $KCODE is not set to 'UTF8'. Because this handler doesn't define any methods all call
+# will be forwarded to String.
+class ActiveSupport::Multibyte::Handlers::PassthruHandler
+
+ # Return the original byteoffset
+ def self.translate_offset(string, byte_offset) #:nodoc:
+ byte_offset
+ end
+end \ No newline at end of file