|
From: <php...@li...> - 2007-08-24 16:00:14
|
I'm afraid I don't see how this helps. (My use of a String was only an
attempt to more simply demonstrate the problem.) I'm using a class that
takes a byte array and gives a byte array:
protected byte[] data;
public byte[] getData() {
return data;
}
public void setData(byte[] value) {
this.data =3D value;
}
And this is basically how I'm testing it:
$file =3D file_get_contents('foo.pdf');
$javaObject->setData($file);
$output =3D $javaObject->getData();
strcmp($file, $output);
=09
And the bytes coming out of the getData() method are different from the
bytes going into the setData() method. Sorry for being so dense on
this.
Thanks,
Jonathan
=20
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Friday, August 24, 2007 11:32 AM
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] Bytes are getting=20
> mistranslated somewhere
>=20
> Hi,
>=20
> > $bytes =3D $string->getBytes();
>=20
> getBytes() depends on the LOCALE. Please see your Java=20
> documentation for details.
>=20
>=20
> Please use $string->getBytes("ENCODING") or use=20
> java_values($string) instead. java_values() uses
> the file encoding set with java_set_file_encoding(), default is UTF-8.
>=20
> Please see the README and the java_set_file_encoding() for details.
>=20
>=20
> Regards,
> Jost Boekemeier
>=20
>=20
>=20
> __________________________________ =20
> Alles was der Gesundheit und Entspannung dient. BE A BETTER=20
> MEDIZINMANN! www.yahoo.de/clever
>=20
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and=20
> a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>=20
>=20
|