faico
Messages postés9Date d'inscriptionlundi 1 août 2005StatutMembreDernière intervention17 mars 2006
-
14 mars 2006 à 22:29
Twinuts
Messages postés5375Date d'inscriptiondimanche 4 mai 2003StatutModérateurDernière intervention14 juin 2023
-
15 mars 2006 à 00:11
Salam : paix(en arabe)
Je souhaite ouvrire un fichier texte codé en UTF-8 avec mon aplli JAVA mais le probléme que JAVA utilise UTF-16.
Alors si vous avez une foction qui me transforme les octets que
je recupere appartir du fichier en UTF-16 elle sera la bienvenue
.Paceque j'ai du mal à ecrire une (les char sont codés soit sur 1,2 ou
3 octets cela me fait mal en tete) et il n'y a pas bcp de temp .
Constructs a new <tt>String</tt> by decoding the specified array of
bytes using the specified charset. The length of the new
<tt>String</tt> is a function of the charset, and hence may not be equal
to the length of the byte array.
The behavior of this constructor when the given bytes are not valid
in the given charset is unspecified. The
CharsetDecoder
class should be used when more control
over the decoding process is required.
* Parameters: :
bytes
- the bytes to be decoded into characters<dd>
charsetName
- the name of a supported
charset
* Throws: :
UnsupportedEncodingException
- If the named charset is not supported * Since: : <dd>JDK1.1