icsharpcode / SharpDevelop

#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
2.08k stars 771 forks source link

Help Viewer issues and feature requests #775

Open FallenPhoenix opened 8 years ago

FallenPhoenix commented 8 years ago

Hello. I have several IDE installed on my PC: SharpDevelop 3.2, 5.1 and VS 2010 with its help. Help Viewer in classic 3rd version of #Develop works fine for me (with help package for VS 2008). But I have some troubles with 5th version.

FallenPhoenix commented 7 years ago

I fixed issue with encoding for myself. There WebClient used, and it seems to have Windows encoding by defaults, but help has UTF8. Solution -> AddIns -> Misc -> HelpViewer -> Source -> Controls -> TocEntry,cs there have to set WebClient Encoding property to UTF8

Diff:

--- a/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs
+++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs
@@ -42,7 +42,7 @@ class TocEntry : INotifyPropertyChanged
    {
        const string url = "ms-xhelp://?method=children&id={1}&format=xml&{0}";
        string id;
-       WebClient client = new WebClient();
+       WebClient client = new WebClient() {Encoding = System.Text.Encoding.UTF8};

        public TocEntry(string id)
        {

(I used sources for version 5.0.0.4755, but it seems no changes in addin since that time)

FallenPhoenix commented 7 years ago

... what about duplicated "Visual Studio 2010", that what I have in children.Value for root node:

Visual Studio 2010BA237712-F8C4-4D13-854B-AB4A16AFA309&topicversion=100&topiclocale=EN-US&SQM=1
Visual Studio 2010BA237712-F8C4-4D13-854B-AB4A16AFA309&topicversion=100&topiclocale=RU-RU&SQM=1
.NET Framework 4F61F02F2-2F20-483D-8F56-A9C8F3A54986&topicversion...

There URL from official help viewer, which I can copy-paste into browser and see there instead :

http://127.0.0.1:47873/help/1-3064/ms.help?method=page&id=BA237712-F8C4-4D13-854B-AB4A16AFA309&product=VS&productversion=100&locale=ru-RU&format=html&topicVersion=100&topicLocale=EN-US&embedded=true

http://127.0.0.1:47873/help/1-3064/ms.help?method=page&id=BA237712-F8C4-4D13-854B-AB4A16AFA309&product=VS&productversion=100&locale=ru-RU&format=html&topicVersion=100&topicLocale=RU-RU&embedded=true

So, they have same id, and the only difference in their links is topic locale.