[#115884] Windows Ruby 3.2.2: Non-English character added to Windows Registry String Value — Jay Mav via ruby-core <ruby-core@...>
Hello,
3 messages
2023/12/24
[ruby-core:115769] [Ruby master Feature#20069] Buffer class in stdlib
From:
duerst via ruby-core <ruby-core@...>
Date:
2023-12-17 23:37:52 UTC
List:
ruby-core #115769
Issue #20069 has been updated by duerst (Martin D=FCrst).
pynix (Pynix wang) wrote:
> ruby use `String` to deal with bytes
Ruby uses big classes. That avoids duplicating a lot of functionality in ma=
ny classes, and also avoids a lot of conversion operations.
> this cause error on irb "invalid byte sequence in utf-8"
Can you show an example?
pynix (Pynix wang) wrote in #note-3:
> irb(main):058> SecureRandom.bytes(10)
> =3D> "\xC5\xFB\x04\x97\xFC\xC0\xF5\xEF{\xA2"
> use String as Bytes get a non unified representation, some bytes is trans=
lated into string, some not.
You can get a uniform representation with `SecureRandom.hex(10)`.
----------------------------------------
Feature #20069: Buffer class in stdlib
https://bugs.ruby-lang.org/issues/20069#change-105706
* Author: pynix (Pynix wang)
* Status: Open
* Priority: Normal
----------------------------------------
ruby use `String` to deal with bytes, this cause error on irb "invalid byt=
e sequence in utf-8"
can we get a builtin class like Buffer or Bytes that represent as hex string
--=20
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c=
ore.ml.ruby-lang.org/