Broken encoding in file names

Michael Timchuck's Avatar

Michael Timchuck

19 Nov, 2013 02:20 PM


I installed brand new hglab, then immediately changed encoding to UTF-8 (codepage 65001), saved.
After that I created new repository and tried to add new file named "Новый текстовый документ.txt".
It is added, but ist name is broken (screen attached).
Ok, I tried to change encoding to Windows-1251, but get an error:

"HgLab Error

There's something wrong under the hood.

System.NullReferenceException: Object reference not set to an instance of an object.
   at HgLab.Areas.Project.Controllers.RepositoryController.<>c__DisplayClass19.<Files>b__d(HgManifestNode f) in d:\projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:line 164
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at HgLab.Areas.Project.Controllers.RepositoryController.Files(Repository repository, String changeset, String path) in d:\projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:line 163
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at HgLab.Core.Framework.Web.HgLabControllerBase.Execute(RequestContext requestContext) in d:\projects\hglab\src\HgLab.Core\Framework\Web\HgLabControllerBase.cs:line 69
   at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
   at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
   at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"

What to do to fix files names encoding?

  1. Support Staff 1 Posted by Anton Gogolev on 19 Nov, 2013 02:25 PM

    Anton Gogolev's Avatar


    Could you please ZIP the repository up and attach it over here?

    Thanks in advance!

  2. 2 Posted by Michael Timchuc... on 20 Nov, 2013 06:43 AM

    Michael Timchuck's Avatar

    HI, when I tried to pull repository I got error (screen inside zip).
    So I created new repo, added new file and got the same behavior.

  3. Support Staff 3 Posted by Anton Gogolev on 25 Nov, 2013 06:55 AM

    Anton Gogolev's Avatar


    Sorry for the delay. I was able to reproduce the issue and currently investigating what can be done about that.

  4. 4 Posted by Carl Berg on 10 Dec, 2014 11:47 AM

    Carl Berg's Avatar

    I have run into this issue aswell with the latest version (1.7.6), so i assume it's not fixed. I also changed the encoding to UTF-8. Pushed in an existing repository and started cloning it (with --debugflag). It hung on a file containing 'ä' in the filename and shortly timed out and showed an error. Samme issue with another repository, hangs on file with the letter 'ä' in the filename. Changed encoding back to 1252 (original setting) and i could successfully clone the repository. Just thought i'd let you know.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • HgLabBug.png 71.4 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM
21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM


18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM