Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by Anonymous Monk
on Sep 06, 2014 at 23:26 UTC ( #1099773=note: print w/replies, xml ) Need Help??


in reply to Database vs XML output representation of two-byte UTF-8 character

Open that file in a hexadecimal editor so that you can see, byte for byte, exactly what those bytes actually are. I would not try to dump the content to the terminal and expect to visually inspect it. There's just too many sources of weirdness that could come into play. Look at the data.
  • Comment on Re: Database vs XML output representation of two-byte UTF-8 character

Replies are listed 'Best First'.
Re^2: Database vs XML output representation of two-byte UTF-8 character
by Anonymous Monk on Sep 07, 2014 at 00:33 UTC
    Open that file

    What file?

    jkeenan1 is working with Catalyst + PostgreSQL ...

      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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-02-27 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?