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

Re^3: Database vs XML output representation of two-byte UTF-8 character

by sundialsvc4 (Abbot)
on Sep 09, 2014 at 00:34 UTC ( #1099922=note: print w/replies, xml ) Need Help??


in reply to Re^2: Database vs XML output representation of two-byte UTF-8 character
in thread Database vs XML output representation of two-byte UTF-8 character

That was my post, which I lost control of, so let me clarify what I was suggesting.   I read the OP to mean that the output of a diag() call within a test suite) was producing results that, say, when printed to the console terminal, seemed to be munged up.   So, what I was suggesting was that you should divert that output instead to a disk-file, then use a hex-editor to examine byte-by-byte exactly what is in-between value=" and the subsequent ".

We see in a later post that, indeed, the garble was being caused by the character-encoding of the terminal window.   I anticipated that this could be the case, because there are just so-o-ooo many places where encoding/decoding can happen in both directions along that particular food-chain.

It is also possible, e.g. in MySQL, to dump the contents of a field in hexadecimal form, and once again this is the strategy that I recommend.   Get some view that will show you what the bytes are, making zero attempt to decode them as anything.   Only then can you really know.

  • Comment on Re^3: Database vs XML output representation of two-byte UTF-8 character

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2021-03-02 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (39 votes). Check out past polls.

    Notices?