web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Save text file with code page UTF-8

(0) ShareShare
ReportReport
Posted on by 555

How do I make a text file with code page UTF-8 in Axapta 3.0?

I cannot use 

myFile = new CommaIo(myFileName, 'W', 65001);

as we can in newer versions of Axapta. In Axapta 3.0 new CommaIo only have the first two parameters.

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Morten,

    Please check this solution from Russian Axapta forum axforum.info/.../showthread.php

  • Morten Steengaard Profile Picture
    555 on at

    Thanks, but in my Axapta 3.0, I cannot make a variable of type "System.Text.Encoding", "System.Text.UTF8Encoding" or "System.IO.StreamWriter".

    Best regards,

    Morten

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Morten,

    I was pointing to this xpo axforum.info/.../attachment.php :-)

  • Verified answer
    Martin Dráb Profile Picture
    237,855 Most Valuable Professional on at

    Both CLR Interop and the support for Unicode were introduced fourteen years ago, in AX 4.0. Not upgrading for fourteen years clearly have consequences.

    Maybe you should simply create the file in another encoding and convert it to UTF-8 outside AX. If you truly can't do that, consider DLL* classes that existed even in AX 3.0, but don't expect anything easy. If I was you, I would rather use a script outside AX.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    XPO (from the last link) contains a class with conversion methods based on DLL approach. If it doesn't work it could give at least an idea.

  • Morten Steengaard Profile Picture
    555 on at

    Thanks a lot, Martin!

  • Morten Steengaard Profile Picture
    555 on at

    Thanks a lot, Sergei.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 659 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 533 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 289 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans