in reply to Re^3: passing data structures from java to perl
in thread passing data structures from java to perl
Java strings are UTF-16
The way strings are stored internally doesn't really matter.
While Perl stores unicode strings internally as UTF-8 (or something very close to it), it can encode those strings to many other encodings for output. The same holds for Java: while it stores strings internally as UTF-16, there's no problem creating UTF-8 output, for example.
Writer utf8out = new BufferedWriter( new OutputStreamWriter( new FileOutputStream("outfile"), "UTF-8" ) ); utf8out.write("some unicode data");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: passing data structures from java to perl
by exussum0 (Vicar) on Jul 28, 2010 at 23:25 UTC | |
by almut (Canon) on Jul 28, 2010 at 23:37 UTC | |
| |
by Anonymous Monk on Jul 29, 2010 at 03:38 UTC | |
Re^5: passing data structures from java to perl
by Jenda (Abbot) on Jul 31, 2010 at 22:47 UTC | |
by Anonymous Monk on Aug 01, 2010 at 00:13 UTC | |
by Jenda (Abbot) on Aug 01, 2010 at 10:59 UTC |
In Section
Seekers of Perl Wisdom