Closed Di-Roll closed 2 years ago
DocNet is a great tool but I have problems with russian encoding. When I try to set russian text in footer I get - ?????
What's generated in the HTML? '????' ?
And I cant search anything in russian (I use Firefox).
Hmm. No idea what that is, might be the indexer in the javascript that only takes english, no idea.
Here Are details of this issue.
Russian text for footer from Docnet.json:
"Footer" : "Водка Медведь Самовар",
Result from index.htm:
Водка Медведь Самовар
Update
I figured it out. In DocNet/src/DocNet/Config.cs file I ve changed line 44 from this:
var configData = File.ReadAllText(configFile, Encoding.Default);
to this:
var configData = File.ReadAllText(configFile, Encoding.GetEncoding("utf-8"));
Now all is fine!
Interesting. Looking at the Encoding.Default help, https://msdn.microsoft.com/en-us/library/system.text.encoding.default(v=vs.110).aspx, this indeed isn't the proper way to do things.
Not sure if searching is fixed by that too, could you try?
I've added UTF-8 encoding to all file reads. It should now properly read the text / docs / config. Could you try the 0.12 source I just pushed? Thanks.
Yes, now I get correct result with UTF-8 encoding.
I got the same problem with searching (locally with Firefox browser) - No results found
.
I opened search_index.json
and tried to search using keywords from file - same result.
Ok, just to clarify, the search now works too? Or is that still broken?
Still broken... You could try to create local page with random russian text and check search function.
Ok, might be the javascript which does the search. As I pulled that from another lib, I have no idea where the bug is in there (or if that's fixable)
I dont have any expirience with javascript yet, but I thinking to try http://www.tipue.com/ fo search.
Hi! DocNet is a great tool but I have problems with russian encoding. When I try to set russian text in footer I get - ????? And I cant search anything in russian (I use Firefox).
It would be great to have an option to turn on/off search.