Create file into UTF-8

nromain
Member Posts: 57
Hello and happy end of year,
I try to generate a file from navision (3.70) encoding in UTF-8 but i don't know how. I cannot use an external program. The file must be directly generate into UTF-8. Could you help me?
Thank you.
Regards,
I try to generate a file from navision (3.70) encoding in UTF-8 but i don't know how. I cannot use an external program. The file must be directly generate into UTF-8. Could you help me?
Thank you.
Regards,
0
Comments
-
you can create in C# a DLL which convert your file in UTF-8.
Google for this, maybe there exist a freeware dll.Do you make it right, it works too!0 -
Thank you for your reply, but i want to directly generate the file into UTF-8. I cannot pass trough an external way.0
-
You can do this with an automation of type 'Microsoft ActiveX Data Objects 2.8 Library'.Stream.
something like this:CREATE(adostream); adostream.Open; adostream.Charset('UTF-8'); adostream.WriteText('testtext'); adostream.SaveToFile('c:\text.txt'); adostream.Close;
0 -
Hello,
i have not try this solution but a collegue show me another one that works :
Create the file you want to export into UTF-8 into a ANSI one. Create another file in binary this time (TEXTMODE = false) and forced the 3 beginning characters to be in hexadecimal : EF BB BF. Then open your first file with textmode = false and read each line and copy them into the second file.
The second file will be considered as UTF-8 (with EF BB and BF value) and contains all datas you want to export.
Best regards,0 -
Interresting one, but this works only if your text contains nothing then good old 7-bit ASCII. Any Character above 7F (127) will result in a garbled textfile.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions