Identify ASCII-Codes for UNICODE

Administrator
Member, Moderator, Administrator Posts: 2,506
Identify ASCII-Codes for UNICODE
With this dataport you can easily identify which ASCII-characters correspond to UNICODE-signs.
This helps a lot when doing import/export of data, especially in countries such as Poland, Hungary, Czechia,...
Use this for a conversion such as:
Export Data conversion:
Function:
ConvChar_CZ_Exp(InputString_ : Text[1024]) : Text[1024]
WHILE i < STRLEN(InputString_)+1 DO BEGIN
i := i +1;
CASE InputString_ OF
'?':BEGIN
InputString_ := 239;
Char2 := 187;
Char3 := 191;
Char4 := 196;
Char5 := 155;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + FORMAT(Char2) + FORMAT(Char3) + FORMAT(Char4) + FORMAT(Char5) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
'':BEGIN
InputString_ := 197;
Char := 161;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
'?':BEGIN
InputString_ := 196;
Char := 141;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
end;
EXIT(InputString_);
Import data conversion:
Function:
ConvertChar_CZ_Import(InputString_ : Text[1024]) : Text[1024]
FOR i := 1 TO STRLEN(InputString_) DO BEGIN
CASE InputString_ OF
197 :
BEGIN
CASE InputString_[i+1] OF
161: InputString_ := '';
153: InputString_ := '?';
190: InputString_ := '';
175: InputString_ := '?';
160: InputString_ := '';
152: InputString_ := '?';
189: InputString_ := '';
174: InputString_ := '?';
END;
InputString_ := COPYSTR(InputString_,1,i) + COPYSTR(InputString_,i+1);
END;
196 :
BEGIN
CASE InputString_[i+1] OF
141: InputString_ := '?';
154: InputString_ := '?';
140: InputString_ := '?';
END;
InputString_ := COPYSTR(InputString_,1,i) + COPYSTR(InputString_,i+1)
END;
EXIT(InputString_);
I encluded an example file which contains all special signs of the desired language. Import it with the dataport and you'll get a file which contains the ASCII-chars expressions.
If you need help for this please feel free to contact me.
http://www.mibuso.com/dlinfo.asp?FileID=941
Discuss this download here.
With this dataport you can easily identify which ASCII-characters correspond to UNICODE-signs.
This helps a lot when doing import/export of data, especially in countries such as Poland, Hungary, Czechia,...
Use this for a conversion such as:
Export Data conversion:
Function:
ConvChar_CZ_Exp(InputString_ : Text[1024]) : Text[1024]
WHILE i < STRLEN(InputString_)+1 DO BEGIN
i := i +1;
CASE InputString_ OF
'?':BEGIN
InputString_ := 239;
Char2 := 187;
Char3 := 191;
Char4 := 196;
Char5 := 155;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + FORMAT(Char2) + FORMAT(Char3) + FORMAT(Char4) + FORMAT(Char5) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
'':BEGIN
InputString_ := 197;
Char := 161;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
'?':BEGIN
InputString_ := 196;
Char := 141;
InputString_ := COPYSTR(InputString_,1,i) + FORMAT(Char) + COPYSTR(InputString_,i+1);
i := i + 1;
END;
end;
EXIT(InputString_);
Import data conversion:
Function:
ConvertChar_CZ_Import(InputString_ : Text[1024]) : Text[1024]
FOR i := 1 TO STRLEN(InputString_) DO BEGIN
CASE InputString_ OF
197 :
BEGIN
CASE InputString_[i+1] OF
161: InputString_ := '';
153: InputString_ := '?';
190: InputString_ := '';
175: InputString_ := '?';
160: InputString_ := '';
152: InputString_ := '?';
189: InputString_ := '';
174: InputString_ := '?';
END;
InputString_ := COPYSTR(InputString_,1,i) + COPYSTR(InputString_,i+1);
END;
196 :
BEGIN
CASE InputString_[i+1] OF
141: InputString_ := '?';
154: InputString_ := '?';
140: InputString_ := '?';
END;
InputString_ := COPYSTR(InputString_,1,i) + COPYSTR(InputString_,i+1)
END;
EXIT(InputString_);
I encluded an example file which contains all special signs of the desired language. Import it with the dataport and you'll get a file which contains the ASCII-chars expressions.
If you need help for this please feel free to contact me.
http://www.mibuso.com/dlinfo.asp?FileID=941
Discuss this download here.
0
Comments
-
:shock:
Just noticed this.
So if I have problems with some characters while importing, exporting I can use this to create 2 translation files...
The first one I create in notepad with all my special characters. The second one, will be created by this code
What to do next?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