Inport Arabic text with codeunit

m_schuurman
Member Posts: 7
I'm trying to import arabic text with a codeunit. When the data is saved in the navision database the arabic text is changed to "junk" characters.
I have changed the Windows regional settings to Arabic. It is possible to directly type arabic text in the navision tables, this is saved correctly. But when I try to import this with a codeunit (or dataport) it's not working.
Does anybody have a solution??
I have changed the Windows regional settings to Arabic. It is possible to directly type arabic text in the navision tables, this is saved correctly. But when I try to import this with a codeunit (or dataport) it's not working.
Does anybody have a solution??
0
Comments
-
Hej,
no help with arabic characters, but it might be the same problem: In Denmark we have some (that's 3) special characters.
They are converted wrong when reading/writing infomation to/from NAV.
To handle this, there is a codeunit, where a char mapping between ANSI and OEMI char codes has been made.
E.g.Function Ansi2Ascii(_Text : Text[250]) : Text[250] EXIT(CONVERTSTR(_Text,AnsiStr,AsciiStr)); Function Ascii2Ansi(_Text : Text[250]) : Text[250] EXIT(CONVERTSTR(_Text,AsciiStr,AnsiStr)); Function MakeVars() AsciiStr[1] := 128; AnsiStr[1] := 199; AsciiStr[2] := 129; AnsiStr[2] := 252; AsciiStr[3] := 130; AnsiStr[3] := 233; ... AnsiStr[95] := 179; AsciiStr[96] := 253; AnsiStr[96] := 178; AsciiStr[97] := 255; AnsiStr[97] := 160;
It used as follows// Setup Code tables ConverterCodeunit.MakeVars; ... open file ... INFile.READ(TextLine); TextLine := Ansi2Ascii(TextLine);
Allthouhg not solve you problem, I hope this will help youWith Kind Regards
Thoms Hviid Thorn0 -
Thomas thank you for your quick reply. I will look into this!0
-
I am afraid that it is more difficult with Arabic characters.
I think (if not, it is some other problem) that Arabic characters are double byte-characters. So if you import them via a dataport, you will have a problem. This because the dataport does some conversions on the text imported and does not keep the original values. So you should import them using a file-variable and open it for reading binary-values. But I don't know how it should be handled once you have the info in Navision.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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