Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: JSON::XS Cyrillic unicode not saving properly

by cormanaz (Deacon)
on Mar 21, 2021 at 20:28 UTC ( [id://11130054]=note: print w/replies, xml ) Need Help??


in reply to Re^3: JSON::XS Cyrillic unicode not saving properly
in thread JSON::XS Cyrillic unicode not saving properly

Output is three lines of Cyrillic (I don't know how to get this website to accept Cyrillic chars). Same thing when I write to a file instead of STDOUT.

I think the database transaction is not the problem. When I run Lingua::Identify on the items in the DB then compare the detected language to the item in the DB, it's getting the languages correct. It couldn't do that if the DB was returning non-Cyrillic characters, right?

This suggests the problem is in the output. But I am setting binmode on the output file with the correct encoding, just like in your example. I also tried declaring utf-8 encoding in the open statement, but am still getting the ANSII ourput. This is perplexing.

  • Comment on Re^4: JSON::XS Cyrillic unicode not saving properly

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found