Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. CONot sure how this differs from my example. Could you post an example that demonstrates that this actually transcodes between encodings? My tests indicate that code does exactly what mine does. If you have a byte array encoded in UTF-8, and pass in "Windows-1252" as the target encoding, you won't get back a properly encoded string -- you'll get gibberish. See my Charset transcode() implementation. I think that's what we're after.
      singulars
    2. CO@James it seems you harbor some misconceptions as to what Java strings are. They're *decoded* characters (using UTF-16 internally, but that is irrelevant here). You cannot decode a string. Byte arrays are decoded to Strings, and Strings are encoded to byte arrays. Transcoding starts and ends with byte arrays, because a byte array is a concrete, encoding-dependant representation of an abstract string.
      singulars
    3. COThank you. I am maintaining an app where the String was created improperly upstream (in some DAO code, due to data stored improperly in MySQL). Raw bytes were UTF-8, but the String was created with Windows-1252. My goal was to take a Java string, which is all I have at this point, and somehow transmogrify it so it's not gibberish. I realize I'm not solving root cause, etc, but tis our plight sometimes in maintenance engineering. Jochaim's answer that 0x81 is not defined in Windows-1252 explains why I cannot recover that character.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload