snappy icon indicating copy to clipboard operation
snappy copied to clipboard

Breaks with UTF-8 charcaters (Danish character)

Open kevinrademan opened this issue 2 years ago • 0 comments

It appears this library is breaking for UTF8 characters (See code below). I noticed that your currently forcing the encoding to Encoding::ASCII_8BIT (https://github.com/miyucy/snappy/blob/master/lib/snappy/shim.rb#L16)

pry(main)> Snappy.inflate(Snappy.deflate("æ"))
=> "\xC3\xA6"

Is there any reason why your doing this?

kevinrademan avatar Nov 11 '21 14:11 kevinrademan