Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About the output of the UTF-8 file

6 views
Skip to first unread message

sider2jp

unread,
Dec 17, 2009, 11:17:59 PM12/17/09
to dev-tech-js-...@lists.mozilla.org
Hello

C:\>type file.js
importPackage(java.io);

var file = new PrintWriter(
new BufferedWriter(
new FileWriter("sample.txt")), "UTF-8");

file.println("For example Multibyte String");
file.close();

C:\>rhino
Rhino 1.7 release 2 2009 03 22
js> load("file.js");

Then the "java.io.BufferedWriter@16f8cd0" file that
"For example Multibyte String" was described is output,
and sample.txt of 0kb is output
--------------------------------------
Get Disney character's mail address on Yahoo! Mail
http://pr.mail.yahoo.co.jp/disney/

sider2jp

unread,
Dec 18, 2009, 1:39:42 AM12/18/09
to dev-tech-js-...@lists.mozilla.org
I'm sorry I was able to do it in

importPackage(java.io);

var file = new PrintWriter(
new BufferedWriter(

new OutputStreamWriter(
new FileOutputStream("sample.txt"), "UTF-8")));

file.println("For example Multibyte String");

file.close();


> Hello
>
> C:\>type file.js
> importPackage(java.io);
>
> var file = new PrintWriter(
> new BufferedWriter(
> new FileWriter("sample.txt")), "UTF-8");
>
> file.println("For example Multibyte String");
> file.close();
>
> C:\>rhino
> Rhino 1.7 release 2 2009 03 22
> js> load("file.js");
>
> Then the "java.io.BufferedWriter@16f8cd0" file that
> "For example Multibyte String" was described is output,
> and sample.txt of 0kb is output
> --------------------------------------
> Get Disney character's mail address on Yahoo! Mail
> http://pr.mail.yahoo.co.jp/disney/

> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> dev-tech-js-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

0 new messages