I have a project who scans a folder full of folders with - sometimes - Characters with values above 127 and below 256.
I build a report in html (but html here is not the problem).
Some days ago I had “Météor” in all sub-folders of a Master Folder and I ger troubles in the generated html.
I found where the problem lies and I put a work around FOR THIS Master folder. Of course this work-around will ot work on another Master folder.
So, I looked at my project code and found nowhere a Locale missing.
And (or But ?), there was no bug with Object names without the non ASCII characters (I had to remove that " - 5" work-around for these Master Folders…).
So, this is really an Encoding Bug, but where ?
My answer was: "If this is in the Folder Names insode the Master Folder, set there an encoding and see what happens…”
Now, minutes ago I get suspicious about FolderItem.Name. (Read above)
So, I read the documentation entry for FolderItem.Name and found nothing about Encoding.
At least, I decided to change the FolderItem.Name and set it an encoding:
For Each Loc_FI As FolderItem In gMaster_FI.Children
Var Loc_Name As String // The item name
Loc_Name = Loc_FI.Name.DefineEncoding(Encodings.UTF8)
Liste.Add Loc_FI.Name
Next
This is basically the used code; only change is:
.DefineEncoding(Encodings.UTF8)
The trouble was cleared.
Your opinion ?
PS: this is a typic US-developers bug because they do not use these characters. A bug nearly only foreigner can detect (of course !)