Closed denistex closed 7 years ago
I think the thing you need to do is to make sure that STDOUT is set to accept UTF-8, which you can do via this: http://perldoc.perl.org/perlunicook.html#%211e-15%3a-Declare-STD%7bIN%2cOUT%2cERR%7d-to-be-utf8
I'll leave this open to add a note to both the Stdout and Stderr adapters to recommend this for these situations.
Thanks for the answer!
Unfortunately configuring STDOUT
didn't help me, so I continued research and found that Data::Dumper
dumps data in that strange way. I googled around a bit and found great module named Data::Dumper::AutoEncode that solves my problem. I've written custom formatter using AutoEncode and it works like a charm now! :sunglasses:
So the issue is solved, thanks for your help and thanks @bayashi for useful module! :+1:
Ohhh! It's Data::Dumper doing it. Alright, I'll instead add a note about using that module in the case where you want to see those high-bit characters. Do you have an example of configuring a formatter that I can add to the docs?
Sure! I've created a gist for you.
I just realized that my first message is not correct (sorry about that) - $message
variable doesn't contain Russian symbols actually, but @params
do.
I added a TIPS
section to Log::Any::Proxy with an example formatter that uses Data::Dumper::AutoEncode. Thanks for the sample code!
Hi guys and thanks for the great module!
I have a question for you and I can't found another way to ask you so probably this ticket is not an issue (sorry if so). I'm a newbie on Perl and I have Unicode problems all the time (I use Russian strings in my project). So here is my problem: I want to see Russian symbols in the log, but they looks like this:
\x{41c}\x{43e}\x{451}
. Is it possible to see valid symbols with your module? What should I do for that? Thanks in advance!Here is how I'm using your modules: