Si je veux savoir si ces deux chaînes de caractères sont différentes avec l'opérateur <>, cela ne fonctionne pas.
Je réussis à le faire en utilisant :
Est-ce la "bonne" méthode ?



Code : Tout sélectionner
; Unicode Normalization Forms
Global Enum $UNF_NormC = 1, $UNF_NormD, $UNF_NormKC = 5, $UNF_NormKD
Func _UNF_Change($sIn, $iForm)
	If $iForm = $UNF_NormC Or $iForm = $UNF_NormD Or $iForm = $UNF_NormKC Or $iForm = $UNF_NormKD Then
		Local $aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", 0, "int", 0)
		Local $tOut = DllStructCreate("wchar[" & 2 * ($aRet[0] + 20) & "]")
		$aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", DllStructGetPtr($tOut, 1), "int", 2 * ($aRet[0] + 20))
		Return DllStructGetData($tOut, 1)
	Else
		SetError(1, 0, $sIn)
	EndIf
EndFunc   ;==>_UNF_Change
Local $s = "挜IJijfffiflffifflſtstȸȹʣʤʥʦʧʨʩʪʫ"         ; forme C normale sous Windows
Local $t = _UNF_Change($s, $UNF_NormKC)                    ; forme KC, décomposition
;vd($s)  ; variable dump qui affiche                    String (23)        '挜IJijfffiflffifflſtstȸȹʣʤʥʦʧʨʩʪʫ'
;vd($t)  ; variable dump qui affiche                    String (34)        '挜IJijfffiflffifflststȸȹʣʤʥʦʧʨʩʪʫ'
_ArrayDisplay(StringToASCIIArray($s))
_ArrayDisplay(StringToASCIIArray($t))