When I test with these files as external xml files, I don't see a problem.

Can you confirm whether you see the problem with a loose .xml file?
I think the problem happens when we read the xml file to write it into the CustomParts.
```````````````````````````
' Copy THE NEW xml file
If Len(Trim(Dir(CountryFileName))) > 0 Then
' Replace the old file
FileCopy CountryFileName, FunctionPath & UsedFileName
iFile = FreeFile
Open FunctionPath & UsedFileName For Input As #iFile
' Load the new XLL content
FileContent = Input(LOF(iFile), iFile)
Close #iFile
' TODO: About encoding problem !!
' FileContent = "<?xml version=""1.0"" encoding=""UTF-8""?>" & vbCrLf & FileContent
' Add the new XML file in CustomXMLParts
Temp = FileContent
ThisWorkbook.CustomXMLParts.Add Temp
`````````````````````
Instead of just using the VBA Input function, I think one needs to use the Windows API to convert properly from UTF-8 to the Windows strings.
Here is some code that does this
````````````````````
Private Declare PtrSafe Function MultiByteToWideChar Lib "kernel32" ( _
ByVal CodePage As Long, ByVal dwFlags As Long, _
lpMultiByteStr As Any, ByVal cbMultiByte As Long, _
lpWideCharStr As Any, ByVal cchWideChar As Long) As Long
Function ReadFileUTF8(FilePath As String) As String
Dim bytes() As Byte
Dim fileNo As Integer
Dim fileLen As Long
Dim requiredSize As Long
Dim result As String
fileNo = FreeFile
Open FilePath For Binary Access Read As #fileNo
fileLen = LOF(fileNo)
If fileLen > 0 Then
ReDim bytes(0 To fileLen - 1)
Get #fileNo, , bytes
End If
Close #fileNo
' Determine the required size for the destination Unicode string
requiredSize = MultiByteToWideChar(65001, 0, bytes(0), fileLen, ByVal 0&, 0)
If requiredSize > 0 Then
result = String$(requiredSize, vbNullChar)
MultiByteToWideChar 65001, 0, bytes(0), fileLen, ByVal StrPtr(result), requiredSize
Else
result = ""
End If
ReadFileUTF8 = result
End Function
`````````````````````````
Then the CustomParts update function becomes something like this
````````````````````````````
Sub EmbedIntelliSense()
Dim strFilename As String
strFilename = "<path to .IntelliSense.xml file>"
Dim strFileContent As String
strFileContent = ReadFileUTF8(strFilename)
Debug.Print strFileContent
ThisWorkbook.CustomXMLParts.Add strFileContent
End Sub
````````````````````````````
-Govert