Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7456

Re: Using encryption with special Unicode characters

From "Qu0ll" <Qu0llSixFour@gmail.com>
Newsgroups comp.lang.java.programmer
References <OvWdnUIcqeRBsMbTnZ2dnUVZ_gCdnZ2d@westnet.com.au> <4e5b3747$0$28393$426a74cc@news.free.fr>
Subject Re: Using encryption with special Unicode characters
Date 2011-08-29 17:18 +1000
Message-ID <EoSdnWYBeIvtoMbTnZ2dnUVZ_t6dnZ2d@westnet.com.au> (permalink)

Show all headers | View raw


"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]

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Using encryption with special Unicode characters "Qu0ll" <Qu0llSixFour@gmail.com> - 2011-08-29 16:11 +1000
  Re: Using encryption with special Unicode characters Mayeul <mayeul.marguet@free.fr> - 2011-08-29 08:56 +0200
    Re: Using encryption with special Unicode characters "Qu0ll" <Qu0llSixFour@gmail.com> - 2011-08-29 17:18 +1000
  Re: Using encryption with special Unicode characters Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-08-29 00:29 -0700
  Re: Using encryption with special Unicode characters Roedy Green <see_website@mindprod.com.invalid> - 2011-08-29 04:29 -0700

csiph-web