Encoding Converter

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2010-02-04 in Download section
Encoding Converter
A small GUI utility and a COM object to convert files between two different codepages.

Only needs .NET Framework runtime 2.0.

http://www.mibuso.com/dlinfo.asp?FileID=816

Discuss this download here

Comments

  • krikikriki Member, Moderator Posts: 9,115
    Definitely usefull!
    But is is possible to make a program that can be called from the command-prompt?
    Or via Automation?

    This is needed for importing files without user-interaction.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • nunomaianunomaia Member Posts: 1,153
    In http://dynamicsuser.net/blogs/nunomaia/ ... icode.aspx check comments how to use automation.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    Hi The link did not work, can you explain how to use this utility with automation?
  • nunomaianunomaia Member Posts: 1,153
    Have you registed the COM object ?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    Can you explain how can register the automation?

    I have tried the regsvr32 but then I get the error the startadress for dllregisterserver could not be found.

    The regasm worked but I could not found the automation in Navision, What name should i have?

    I have written the following in dosprompt
    regsvr32 "C:\Documents and Settings\malasto\Mina dokument\mina\encoding\COMEncodingConverter.dll"

    regasm COMEncodingConverter.dll
  • nunomaianunomaia Member Posts: 1,153
    After you register object with regasm (regsvr32 dones't work with .NET)

    you sould have the name COMEncodingConverter in automation list.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    I have registered it with regasm but when I declare a automation variable in navision i cant find COMEncodingConverter...

    When i registered it, it said
    the types was registered.

    What am I´m doing wrong?
  • nunomaianunomaia Member Posts: 1,153
    Can you find COMEncodingConverter with regedit ?
    have you installed .NET 2.0 ?
    Can you run the GUI version ?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    Can you find COMEncodingConverter with regedit ?
    Yes

    have you installed .NET 2.0 ?
    Yes
    Can you run the GUI version ?
    yes I can run the exe file
  • antiloopantiloop Member Posts: 10
    I found the solution.
    I used the wrong syntax to reg. the dll file...

    The right syntax is


    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm /tlb:COMEncodingConverter.t
    lb COMEncodingConverter.dll
  • antiloopantiloop Member Posts: 10
    Now I found the automation but when I try to create the automation i navision, I get the error"Could not create an instance of the OLE control..."

    What am I doing wrong?

    I have looked in this link
    http://demiliani.com/blog/archive/2005/09/19/2965.aspx but no success.

    I failed in the step gacutil, you need a strongname..
    ](*,) ](*,) ](*,) ](*,) ](*,)
  • nunomaianunomaia Member Posts: 1,153
    Sorry for the delayed answer

    Have you done this ? It works for me.
    CREATE(autEnc);
    autEnc.Convert('UTF-8', 'UTF-8', 'c:\a.txt', 'c:\b.txt');
    

    Do you want the source code ?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    yes but the error is on the

    CREATE(autEnc);
  • antiloopantiloop Member Posts: 10
    It would be nice if you could make a setup file for this automation. Is this a possibility??
  • nunomaianunomaia Member Posts: 1,153
    I will put the source code available in a few hours
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • nunomaianunomaia Member Posts: 1,153
    Sorry for delay.
    you can download source code in http://dynamicsuser.net/files/folders/n ... 85851.aspx
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • antiloopantiloop Member Posts: 10
    can you mail me i get a errror at the link.
    magnus.lauberg@systeam.se
  • frankdynamicfrankdynamic Member Posts: 11
    Antiloop,

    I got also a problem with the GACUTIL /i COMEncodingConverter.dll

    I got: FAILURE adding assembly to the cache: Unknown error.


    Is youre problem solved?

    Frank
  • nunomaianunomaia Member Posts: 1,153
    Antiloop,

    I got also a problem with the GACUTIL /i COMEncodingConverter.dll

    I got: FAILURE adding assembly to the cache: Unknown error.


    Is youre problem solved?

    Frank

    Have you solved your problem?
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • janhjjanhj Member Posts: 1
    Hi,
    I have had this problem as well, and I found a solution that works for me.
    when the dll and tlb is created with regasm.exe it needs to be in the cside client folder so NAV can see it. Otherwise you might have to register it in the global assembly cash. But I have not tried that.

    So I copted the files to the client folder and ran this statement, and now it works.
    C:\Program Files\Microsoft Dynamics NAV\CSIDE Client>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe COMEncodingConverter.dll /tlb:COMEncodingConverter.tlb
    

    Best
    Jan
Sign In or Register to comment.