summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/util/constants.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb
index 1c5c0033..70951eb8 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -398,7 +398,7 @@ module Axlsx
# x0D Carriage Return (Cr)
# x09 Character Tabulation
# @see https://www.codetable.net/asciikeycodes
- pattern = "\x0-\x08\x0B\x0C\x0E-\x1F".encode('UTF-8')
+ pattern = "\x0-\x08\x0B\x0C\x0E-\x1F".encode(Encoding::UTF_8)
# The regular expression used to remove control characters from worksheets
CONTROL_CHARS = pattern.freeze