This project is read-only.

NDDclient .NET C# Swedish letters

Jan 17, 2013 at 10:39 AM
Edited Jan 17, 2013 at 10:44 AM

Howdy people I am trying this awsome thing to get URLs from the firefox webbrowser.

I having an problem with displaying swedish letters Å Ä Ö.

 

Running this code

            public static URLDetails[] Firefox()
            {
                NDde.Client.DdeClient dde = new NDde.Client.DdeClient("Firefox", "WWW_GetWindowInfo");
                try
                {
                    dde.Connect();
                    String url = dde.Request("URL", Int32.MaxValue);
                    dde.Disconnect();

                    Int32 stop = url.IndexOf('"', 1);
                    return new URLDetails[]{
                new URLDetails()
                {
                    URL = url.Substring(1, stop - 1),
                    Title = url.Substring(stop + 3, url.Length - stop - 8)
                }
            };
                }
                catch (Exception)
                {
                    return null;
                }
            }
            #endregion
        }



                    // *** Firefox URL Sniffing ***//

                    if (processName == "firefox")
                    {
                        try
                        {
                            (new List(BrowserLocation.Firefox())).ForEach(u =>
                            {
                                browserCounter++;
                                rawUrl = u.URL;
                                urlTitle = u.Title;

                                var match = regex.Match(u.URL);
                                if (match.Success)
                                {
                                    name = match.Groups[1].Value;
                                    urlNameListerner = name;
                                }

                            });

                        }
                        catch (Exception ex)
                        {
                            Debug.Write("Error Firefox: " + ex);
                        }
                    }
                    // *** Firefox URL Sniffing ***//

 

It gives me

When entering these two websites:
http://ndde.codeplex.com/discussions/create
http://www.?strandssnickeri.se/

from this line

                    dde.Connect();
                    String url = dde.Request("URL", Int32.MaxValue);
                    dde.Disconnect();

Its supose to be

http://www.åstrandssnickeri.se/ ;)
How can I solve this? Thanks

 

It works greate in Internet Explorer ^^

Jun 16, 2016 at 2:52 PM
use newDdeClient.Context.Encoding to set right encoding