I need your help with the string encoding for the Text variable in the NAV 2018 (and BC) to ANSI (If I remember correctly MS Dynamics NAV 2009 R2 supports ANSI only).
The start point for the issue - I need to generate the barcode (based on old font) and in the NAV 2018 I received the string " Õ+0"!|ÖEW·* (Ö9#3· ¬Mà " (after the procedure of encoding). But in the NAV 2009 I had another string - " Ò+0"!|ÍEWÌ* (Í9#3Ì ÈMÓ ".
I think the problem is in the encoding - it has changed from ANSI to UTF8 (it was for NAV2016, but I don't know about NAV2018 and BC).
Do you have any ideas about how to do it in right way?
Thank you in advance for any help.
P.S. I have 1 more point now - maybe I need to convert each symbol from the string, but not full text after conversion? But I have the open question again - how to convert 1 char|string[i] only
I have looked at your question several times, since you asked it 3 days a go. Waiting for somebody else to answer it, because I personally did not understand it. But since nobody else seems to have an answer either, then let me try to help you.
What is the context of this question? What is it that you are trying to do? Your subject says you want to convert a text from unicode and NAV 2018 TO anse and NAV 2009. Are you trying to downgrade a NAV 2018 installation??
And what is this about a barcode and a string in NAV 2018 and 2009? Where do you get this string from and how did you get it into NAV? Here it sounds like your question is about upgrading code that worked in NAV 2009 but not in NAV 2018?
As you described the way text encoding has changed quite a lot from NAV 2009 to 2018 (I don't remember any major changes since BC, except that the SaaS may be more restrictive).
There are a few factors in play here. We have to consider both database encoding (assume your NAV 2009 is also SQL, otherwise more factors) and the way we get data in and out of NAV and which codepage is used by the client. I come from a country with three special letters ÆØÅ, which very often are messed up, unless you are really careful. We used to have to run special conversions of the data whenever importing/exporting anything. Today (NAV 2018/BC+) we either have this functionality standard in NAV as encoding options when importing/exporting, or as supporting codeunits we can use in our development.
Love to help you, but please give me more to work with.
Erik P. Ernst said:What is the context of this question? What is it that you are trying to do? Your subject says you want to convert a text from unicode and NAV 2018 TO anse and NAV 2009. Are you trying to downgrade a NAV 2018 installation??
Thank you very much for your answer and delayed answer with clarification.
I do upgrade from NAV 2009 to NAV 2018 and I do not use any export|import procedure.
The source of the issue - I have the report in the NAV 2009 which uses the barcode font. Lest imagine that I need to code string "1116020192EW1000089#30095". When internal "conversion procedure" works in the NAV2009 I receive the string "Ò+0"!|ÍEWÌ* (Í9#3Ì ÈMÓ". But when this procedure works in the NAV 2018 CU11 I'm receiving the "Õ+0"!|ÖEW·* (Ö9#3· ¬Mà" and the result - font prints strange "picture".
I'm guessing that the issue may be in the source line coding
I investigated several solutions for Font barcode printing from other resources and it do not work also for NAV 2018.
P.S. about "I come from a country with three special letters ÆØÅ" - I know that you are from DK