Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > retriving escape unicode sequences from files ...

Reply
Thread Tools

retriving escape unicode sequences from files ...

 
 
qwertmonkey@syberianoutpost.ru
Guest
Posts: n/a
 
      08-03-2012
// __
byte[] bBfr;
char[] cBfr = new char[1024];
// __
String aEncUTF8 = "UTF-8";
String aUniKdEnk = "\u0066\u0072\u0061\u006e\u00e7\u0061\u0069\u0073" ;
// __
try{
// __
InputStream IS = new ByteArrayInputStream(aUniKdEnk.getBytes());
Reader Rdr = new InputStreamReader(IS, aEncUTF;
// __
ByteArrayOutputStream bArOS = new ByteArrayOutputStream();
Writer Wrtr = new OutputStreamWriter(bArOS, aEncUTF;
// __
int numChars = Rdr.read(cBfr);
if(numChars > 0) {
bArOS.reset();
Wrtr.write(cBfr, 0, numChars);
Wrtr.flush();
bBfr = bArOS.toByteArray();
System.err.println("// __ |" + (new String(bBfr)) + "|");
}// (numChars > 0)
// __
}catch(UnsupportedEncodingException UEncX){ UEncX.printStackTrace(System.err); }
catch(IOException IOX) { IOX.printStackTrace(System.err); }
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
retriving escape unicode sequences from files ... qwertmonkey Java 8 08-08-2012 06:20 AM
retriving escape unicode sequences from files ... qwertmonkey@syberianoutpost.ru Java 8 08-07-2012 02:32 AM
retriving escape unicode sequences from files ... qwertmonkey@syberianoutpost.ru Java 0 08-04-2012 10:18 AM
retriving escape unicode sequences from files ... qwertmonkey Java 0 08-03-2012 06:54 PM
retriving escape unicode sequences from files ... qwertmonkey@syberianoutpost.ru Java 0 08-03-2012 10:26 AM



Advertisments