[solved] Navision 2016 C/AL Charset special char Euro sign €

DanielF
Member Posts: 21
Hello everybody,
C/AL Editor has a strange behaviour - I guess the charset of my development environment does not match the database.
For example I can't assign the Eurosign € to a textconstant:
TextConstant := '€';
after compiling C/AL Editor shows:
TextConstant := '?';
How can I achieve to save and compile the Eurosign € into my database?
Yours sincerly and tia
Daniel
C/AL Editor has a strange behaviour - I guess the charset of my development environment does not match the database.
For example I can't assign the Eurosign € to a textconstant:
TextConstant := '€';
after compiling C/AL Editor shows:
TextConstant := '?';
How can I achieve to save and compile the Eurosign € into my database?
Yours sincerly and tia
Daniel
0
Comments
-
What if you create text constant in Global Variables and assign value there?Nav Upgrades and DEV outsourcing
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com0 -
That was my first work around - the result was the same. It did not work.0
-
VAR VarChar@50000 : Char; VarText@50001 : Text; BEGIN VarChar := 8364; VarText[1] := VarChar; MESSAGE(VarText); END;
1 -
Thanks a lot Duikmeester. I still can't believe this would and could be a problem in NAV 2016.0
-
The problem is the Development Environment is still OEM encoding. Even the object text export/import is OEM.
p.s. please mark as solved0 -
Okay I'll mark it - but OEM encoding?! Are there more consequences wich I am not aware of?0
-
Don't know about the DE version of the database. However the NL version has a Report 11000007 Export BTL91-ABN AMRO which contains the following code:
Text := CONVERTSTR(Text, 'ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜøØáíóúñÁÂÀ¢¥ãÃðÐÊËÈiÍÎÏËÈÌÓßÔÒõÕµÚÛÙýÝ', 'CueaaaaceeeiiiAAEaAooouuyOUoOaiounAAAcyaAoDEEEiIIIEEIOBOOoOuUUUyY');
if I export this object as text, edit it in Notepad and import it again it will be converted into:Text := CONVERTSTR(Text, '??????????????????????????????????????????????i??????????????????', 'CueaaaaceeeiiiAAEaAooouuyOUoOaiounAAAcyaAoDEEEiIIIEEIOBOOoOuUUUyY');
or:Text := CONVERTSTR(Text, '€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š› ¡¢£¤µ¶·½¾ÆÇÐÑÒÓÔiÖרÓÔÞàáâãäåæéêëìí', 'CueaaaaceeeiiiAAEaAooouuyOUoOaiounAAAcyaAoDEEEiIIIEEIOBOOoOuUUUyY');
depending the settings of the text editor.
Editing NAV code in textfiles with a text editor you will have to set the editor explicitly to using OEM encoding when the code contains characters which have different code point between OEM and ANSI or ISO-8859-1 or UTF-8.
TLDR; Dont work with code outside of NAV itself unless you know what you are doing!1 -
You may have noticed, that the Euro-sign is not even contained in the OEM character set cp850 as used in western European windows versions. NAV used to map some additional characters into cp850, among them the €. Now, NAV 2016 appears to no longer use those additional glyphs, but instead uses the standard cp850 ones. The editor uses unicode or ansi, then converts it. Thus it saves € as ? (that's the standard ASCII question mark), because there is no conversion possible. When you try to use an ML-text constant, the GUI (Windows client) draws the € as ░, which is the glyph that Cp850 uses for codepoint 176, which NAV used to use to store €.
See also encoding of exported navision objects (.txt files)
I did not know that the Char type now supports Unicode codepoints. Thanks, Duikmeester, for pointing that out.
The NAVDACH objects used to use similar conversion tables. You could not export those as text objects and later re-import them without distorting the conversion. I assume, with the new editor you would destroy them even with a simple save?0 -
And for reports you apparently need to use labels to show Euro sign properly
https://community.dynamics.com/nav/b/dynamicsblognav/archive/2016/02/04/nav2016-w10-euro-zeichen-in-reports-nicht-mehr-richtig-anzeigt
But with labels the dynamical change of report language (based on document language code) doesn't work.(and this is hysterical laugh)
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