Aide:BinaryToString.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Function###
BinaryToString

###Description###
Converts a binary variant into a string.

###Syntax###
BinaryToString ( expression [, flag] )


###Parameters###
@@ParamTable@@
expression
	An expression to convert into a string.
flag
	[optional] Changes how the binary data is converted:
	  flag = 1 (default), binary data is taken to be ANSI
	  flag = 2, binary data is taken to be UTF16 Little Endian
	  flag = 3, binary data is taken to be UTF16 Big Endian
	  flag = 4, binary data is taken to be UTF8
@@End@@


###ReturnValue###
@@ReturnTable@@
Success:	The string representation of the binary data.
Failure:	An empty string.  @error will bet set as follows:
	1 - Input string had zero length.
	2 - Input string had an odd number of bytes but was supposed to be UTF16 (must contain an even number of bytes to be valid UTF16).
@@End@@


###Remarks###
Unlike String() which returns a hexidecimal representation of binary data, this function will assume the binary data is a string value and convert it appropriately.


###Related###
Binary, IsBinary, String, StringToBinary, StringToASCIIArray


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Function###
BinaryToString

###Description###
Convertit une variable binaire en une chaîne de caractère.


###Syntax###
BinaryToString ( expression [, flag] )


###Parameters###
@@ParamTable@@
expression
	Une expression à convertir en une chaîne.
flag
	[optionnel] Change la manière dont les données binaires sont converties:
	  flag = 1 (défaut), les données binaires sont encodées avec la norme ANSI
	  flag = 2, les données binaires sont encodées en UTF16 Little Endian
	  flag = 3, les données binaires sont encodées en UTF16 Big Endian
	  flag = 4, les données binaires sont encodées en UTF8
@@End@@


###ReturnValue###
@@ReturnTable@@
Succès:	la chaîne de caractère convertie à partir des données binaires.
Echec:	Une chaîne vide. @ erreur sera défini comme suit:
	1 - La chaîne d'entrée a une longueur nulle.
	2 - La chaîne d'entrée a un nombre impair d'octets, mais devait être en UTF16 (elle doit 

contenir un nombre pair d'octets pour être valide UTF16).
@@End@@


###Remarks###
<DIV id=gt-res-content class=almost_half_cell>
<DIV dir=ltr><SPAN id=result_box lang=fr><SPAN title="">Contrairement à <STRONG>String ()</STRONG> 

qui retourne une représentation hexadécimale de données binaires, cette fonction&nbsp;considère les 

données binaires&nbsp;comme une valeur de chaîne et la convertit de façon 

appropriée.</SPAN></SPAN></DIV></DIV>


###Related###
<a href="Binary.htm">Binary</a>, <a href="IsBinary.htm">IsBinary</a>, <a 

href="String.htm">String</a>, <a href="StringToBinary.htm">StringToBinary</a>, <a 

href="StringToASCIIArray.htm">StringToASCIIArray</a>


###Example###
@@IncludeExample@@


Traducteur : timmalos

Contributeurs (pour les modifications avant le Wiki) : Jerome, Tlem