We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
force_encoding
pack
1 parent 50b33d5 commit 24c2d34Copy full SHA for 24c2d34
lib/babosa/identifier.rb
@@ -269,7 +269,7 @@ def normalize_utf8!
269
# @return String
270
def tidy_bytes!
271
@wrapped_string = @wrapped_string.scrub do |bad|
272
- tidy_byte(*bad.bytes).flatten.compact.pack("C*").codepoints.pack("U*")
+ tidy_byte(*bad.bytes).flatten.compact.pack("C*").force_encoding("UTF-8")
273
end
274
275
0 commit comments