Special character when reading data from file .sdf

giovannixyz
Member Posts: 13
Hi, In our navision we have custom program, wich can read data from .sdf file.
I create this file in SQL and safe on disk. navision read it, by clicking it.
problem is, because special charasters like 'č,ć,š' in navision don`t show.
any idea, how to solve this?
in global special character works, but here not.
I create this file in SQL and safe on disk. navision read it, by clicking it.
problem is, because special charasters like 'č,ć,š' in navision don`t show.
any idea, how to solve this?
in global special character works, but here not.
0
Comments
-
It is codepage problem.
I have this two function to convert special characters from NAV to file, and from file to NAV.
But it works in Croatia.
Best way to do is to save file from SQL with one string conatining special characters ČŠĐŽ...
ŽImport it and then you parse it to int like:
i ineteger
i:=incomeText[1]; //supose first leter is Č
MESSAGE('%1',i); Then you know that char code you must replace with Č
My funtioncs:
FromFileToNAV(inText : Text[500]) outText : Text[500]
NasiZnaci[1]:=138; //equals to Š in from file
NasiZnaci[2]:=208; // equals to Đ in from file
NasiZnaci[3]:=200; //...
NasiZnaci[4]:=198;
NasiZnaci[5]:=142;
NasiZnaci[6]:=154;
NasiZnaci[7]:=240;
NasiZnaci[8]:=232;
NasiZnaci[9]:=230;
NasiZnaci[10]:=158;
outText:=CONVERTSTR(inText,NasiZnaci,'ŠĐČĆŽšđčćž');
second function:
FromNAVtoFile(inText : Text[500]) outText : Text[500]
NasiZnaci[1]:=138;
NasiZnaci[2]:=208;
NasiZnaci[3]:=200;
NasiZnaci[4]:=198;
NasiZnaci[5]:=142;
NasiZnaci[6]:=154;
NasiZnaci[7]:=240;
NasiZnaci[8]:=232;
NasiZnaci[9]:=230;
NasiZnaci[10]:=158;
outText:=CONVERTSTR(inText,'ŠĐČĆŽšđčćž',NasiZnaci);0 -
But the problem is, because Navision read withouth Č.Š,Ž
I try to replace this in SQL with ( [ { and in navi back again to ČšŽ with
string_opomba := CONVERTSTR(string_opomba, '[', 'č');
but now I got z and Ž, s Š ... mixed up. any idea?0 -
I also found on problem where inbound files where in unicode format, where spectial charters where compaund of 2 bytes, then you must parse stirng by 2 to 2 bytes and try to find combinations. If you could uplad file maybe i can help.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