You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To subscribe to incoming data of a connected IO::Socket::Async, the choices currently are:
.Supply() -- get UTF-8 decoded data as Str
.Supply(:bin) -- get raw data as Buf
In analogy to the open() function that takes both :bin and :enc adverbs, this should probably also accept :enc to allow dealing with text-based protocols in different encodings:
.Supply(:enc<utf8-c8>)
PS: Speaking of which, maybe utf8-c8 should be the default, considering jnthn's comment here¹ that "All things coming from the OS are decoded [as utf8-c8]", and reading from a socket might be considered "from the OS".
On Sat Aug 06 11:59:50 2016, smls75@gmail.com wrote:
To subscribe to incoming data of a connected IO::Socket::Async, the
choices currently are:
.Supply() -- get UTF-8 decoded data as Str
.Supply(:bin) -- get raw data as Buf
In analogy to the open() function that takes both :bin and :enc
adverbs, this should probably also accept :enc to allow dealing with
text-based protocols in different encodings:
.Supply(:enc<utf8-c8>)
This is now implemented. You can also set the default encoding that should apply when calling `.listen` and `.connect` (the one on .Supply always take precedence, however). That also sets the encoding for the sake of `.print`.
Migrated from rt.perl.org#128863 (status was 'resolved')
Searchable as RT128863$
The text was updated successfully, but these errors were encountered: