Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1387 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

utf-8 ??

n°1642791
nORKy
Grmmph...
Posté le 14-11-2007 à 15:22:21  profilanswer
 

Est-ce que Visual Studio compile les chaine static en utf-8 ??
Est-ce que toutes les fonctions sur les chaines travailles sur de l'utf-8 ??
Sinon, comment faire ?
 
Merci

mood
Publicité
Posté le 14-11-2007 à 15:22:21  profilanswer
 

n°1642911
MagicBuzz
Posté le 14-11-2007 à 17:53:37  profilanswer
 

http://www.yoda.arachsys.com/csharp/strings.html
 
Les strings en C# sont en UNICODE (comme toute chaîne sous Windows 32 bits, puisque c'est l'encodage type utilisé par Windows).
 

Citation :


Encoding
(If you don't know about character encodings and Unicode, please read my article on the subject first.)  
 
As stated at the start of the article, strings are always in Unicode encoding. The idea of "a Big-5 string" or "a string in UTF-8 encoding" is a mistake (as far as .NET is concerned) and usually indicates a lack of understanding of either encodings or the way .NET handles strings. It's very important to understand this - treating a string as if it represented some valid text in a non-Unicode encoding is almost always a mistake.  
 
Now, the Unicode coded character set (one of the flaws of Unicode is that the one term is used for various things, including a coded character set and a character encoding scheme) contains more than 65536 characters. This means that a single char (System.Char) cannot cover every character. This leads to the use of surrogates where characters above U+FFFF are represented in strings as two characters. Essentially, string uses the UTF-16 character encoding form. Most developers may well not need to know much about this, but it's worth at least being aware of it.  

n°1643157
nORKy
Grmmph...
Posté le 15-11-2007 à 09:16:38  profilanswer
 

Merci beaucoup


Aller à :
Ajouter une réponse
 

Sujets relatifs
Plus de sujets relatifs à : utf-8 ??


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR