Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail NNTP-Posting-Date: Mon, 29 Aug 2011 02:19:11 -0500 From: "Qu0ll" Newsgroups: comp.lang.java.programmer References: <4e5b3747$0$28393$426a74cc@news.free.fr> In-Reply-To: <4e5b3747$0$28393$426a74cc@news.free.fr> Subject: Re: Using encryption with special Unicode characters Date: Mon, 29 Aug 2011 17:18:27 +1000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Message-ID: Lines: 24 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 124.149.48.246 X-Trace: sv3-6s67WoBe6L+41yVIbhiAr5A3Thxdd0d5gXk7tkuHeKEPldJ7AKK9urbAtmwCIwTcP3KPW3aQTBg1HC1!nmvEATfHAdB/XJRxw87OOukK5I+DHql8buX/jBUW7SAAl94pluTu1zkciSrGnBLgRxPdf8yM8nzZ!MHv6KSwm3Z16TPLrOnt/dg== X-Complaints-To: abuse@westnet.com.au X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2367 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7456 "Mayeul" wrote in message news:4e5b3747$0$28393$426a74cc@news.free.fr... > String.getBytes() and String(byte[]), converting String to byte array > and backwise, is the job of a character encoding, which, in Java, are > called 'charsets'. If you do not specify which charset you want to use, > they will use your default charset, which depends on your environment. > > This charset is not guaranteed to support Unicode. In fact, in western > environments it is rather likely to be iso-8859-1 or likewise, which > does not support Unicode. > > Which is why you're better off forcing the use of a Unicode-compliant > charset, like utf-8. utf-8 and the utf-16s are guaranteed to be > supported by Java, which makes them safe choices. Thanks Mayeul, I now use UTF-8 and it works perfectly :-) -- And loving it, -Qu0ll (Rare, not extinct) _________________________________________________ Qu0llSixFour@gmail.com [Replace the "SixFour" with numbers to email me]