decoding byte array

  • Thread starter Thread starter .paul.
  • Start date Start date
P

.paul.

how do i decode a byte array using getstring, if i don't know which encoding
was used to write it?
 
how do i decode a byte array using getstring, if i don't know which encoding
was used to write it?

That would be pretty hard to do if there's no BOM or other indicator.
You'd probably have to try to figure it out one way or another.

The Windows API offers the function IsTextUnicode which does some
guessing about whether or not a string is in a unicode format or not,
but it's not perfect.


Mattias
 
ok thanks

Mattias Sjögren said:
That would be pretty hard to do if there's no BOM or other indicator.
You'd probably have to try to figure it out one way or another.

The Windows API offers the function IsTextUnicode which does some
guessing about whether or not a string is in a unicode format or not,
but it's not perfect.


Mattias
 
..paul. said:
how do i decode a byte array using getstring, if i don't know which encoding
was used to write it?

Is there no way of changing the problem to "how do I guarantee that I
know what the encoding is"?
 
Back
Top