I am really new in programming in Attain. Some things I can programmed since I knew Attain, but now I got a problem.
I downloaded Ansi2Ascii and want to use it now. Can anyone tell me how I can call the function ansi2ascii from a dataport? Cause NA is not able to export all the german letters.
Can anyone help with my problem?
MSDynamicsNAV 2009 Build 32012 Classic Client
MS SQL Server 2008
nope. I still use the codeunit 99999 this was delivered by Navision.
Put the Codeunit as a variable and give the field to export an extra name.
Then write the following code in the dataport:
Name_co := Ansi.Ascii2Ansi(Name);
this was to export the name from Customer. Call the function "Ansi" from the codeunit and write the value into another var.
I hope this is what you wanted to know.
Greetings,
Michael
MSDynamicsNAV 2009 Build 32012 Classic Client
MS SQL Server 2008
but i do not think i quite understand it, or i notice there must be a problem with ansi character 95 being converted to ascii character 221.
This seems to cause a problem, i was rewriting a visual basic function in C/AL and the output of the function seemed to be the same but not when this character was in the input string.
I thinks this behavior is invalid isn't it ?
In a world without Borders or Fences, who needs Windows and Gates?
[...] I still use the codeunit 99999 this was delivered by Navision. [...]
I think that your codeunit 99999 is not delivered by Navision. This is a solution from your Navision Partner ;-)
(Have a look in the documentation header ;-) )
I am very happy with this function, for I have to export our German and Swedish customers to .csv every now and then.
I have spent many hours in the past using 'search & replace' to get these foreign characters right.
Now it took me 3 minutes to download, program it into my report, and export all data. With valid chars!
Hi,
I am using this convertor tool provide in this post and found out following issue
Problem description :
Data "United Kingdom" after convert, it reads as "UnitedÿKingdom". It seems that space becomes ÿ
Is there any idea or fix on it? Besides, is there any potential / known incorrect characters?
PS I got this work & it rules - their is another post somewhere that updates a few of the conversions - but I can't find it even tho I just used it a few minutes ago.
anyway - are you sure you're converting in the right direction?
Where SpecialChars is a Global->Codeunit->"What ever you numbered you CU"
CountryName := SpecialChars.Ansi2Ascii(CountryName);
Remember that this code represents only one example of encoding characters.
Part of the confusion here, and why you might experience invalid characters, are for the following reasons:
1. Because the ANSI characters set is not one thing. It is an encoding system that maps to many different ANSI code pages; this download is encapsulating one such code page, probably ANSI 1252. If you are using a different ANSI code page, some characters (or rather, code points) will not convert as you expect.
2. Because ASCII is a 7-bit encoding, but NAV is not actually using this anyway. NAV is using OEM encoding, which is an 8-bit encoding too and also has many code pages. The closest to ASCII is OEM 437; closest meaning that most code points that are possible to represent in ASCII are also in OEM 437 up until code point 128, with OEM having more beyond this of course, as does an ANSI code page.
So what you get here is a snapshot of one possible character conversion, which may or may not work for you depending on your environment (ANSI and OEM system code pages in windows) and the characters you actually need to convert. This is just inherent in the single byte code page system. If I create a file from NAV containing all characters, using my OEM 850 based computer and e-mail it to someone using OEM 437, then many extended characters will not be convertable, and will "look wrong". And in any case, both OEM 437 and OEM 850 are not ASCII.
I see what you mean i need ã to translate - the converter does many characters but not that one. perhaps I can keep adding strange characters as they come up.
Comments
I try this function, but it doesn't work.
Anyone can help me to find a way to convert Ascii to Ansi and back?
Thank you very much!
Andras
I am really new in programming in Attain. Some things I can programmed since I knew Attain, but now I got a problem.
I downloaded Ansi2Ascii and want to use it now. Can anyone tell me how I can call the function ansi2ascii from a dataport? Cause NA is not able to export all the german letters.
Can anyone help with my problem?
MS SQL Server 2008
Thanks,
Zin
nope. I still use the codeunit 99999 this was delivered by Navision.
Put the Codeunit as a variable and give the field to export an extra name.
Then write the following code in the dataport:
Name_co := Ansi.Ascii2Ansi(Name);
this was to export the name from Customer. Call the function "Ansi" from the codeunit and write the value into another var.
I hope this is what you wanted to know.
Greetings,
Michael
MS SQL Server 2008
but i do not think i quite understand it, or i notice there must be a problem with ansi character 95 being converted to ascii character 221.
This seems to cause a problem, i was rewriting a visual basic function in C/AL and the output of the function seemed to be the same but not when this character was in the input string.
I thinks this behavior is invalid isn't it ?
(Have a look in the documentation header ;-) )
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
Perfect job!
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com
I have spent many hours in the past using 'search & replace' to get these foreign characters right.
Now it took me 3 minutes to download, program it into my report, and export all data. With valid chars!
If I import I need Ansi2Ascii
If I export I need Ascii2Ansi
Correct? YES
See: http://www.mibuso.com/forum/viewtopic.p ... ascii2ansi
I am using this convertor tool provide in this post and found out following issue
Problem description :
Data "United Kingdom" after convert, it reads as "UnitedÿKingdom". It seems that space becomes ÿ
Is there any idea or fix on it? Besides, is there any potential / known incorrect characters?
looks easier to implement (with less characters)
PS I got this work & it rules - their is another post somewhere that updates a few of the conversions - but I can't find it even tho I just used it a few minutes ago.
anyway - are you sure you're converting in the right direction?
Where SpecialChars is a Global->Codeunit->"What ever you numbered you CU"
CountryName := SpecialChars.Ansi2Ascii(CountryName);
EDIT: Here I exported the updated one I found
http://savatage99.googlepages.com/CU501 ... verter.txt
http://www.BiloBeauty.com
http://www.autismspeaks.org
Part of the confusion here, and why you might experience invalid characters, are for the following reasons:
1. Because the ANSI characters set is not one thing. It is an encoding system that maps to many different ANSI code pages; this download is encapsulating one such code page, probably ANSI 1252. If you are using a different ANSI code page, some characters (or rather, code points) will not convert as you expect.
2. Because ASCII is a 7-bit encoding, but NAV is not actually using this anyway. NAV is using OEM encoding, which is an 8-bit encoding too and also has many code pages. The closest to ASCII is OEM 437; closest meaning that most code points that are possible to represent in ASCII are also in OEM 437 up until code point 128, with OEM having more beyond this of course, as does an ANSI code page.
So what you get here is a snapshot of one possible character conversion, which may or may not work for you depending on your environment (ANSI and OEM system code pages in windows) and the characters you actually need to convert. This is just inherent in the single byte code page system. If I create a file from NAV containing all characters, using my OEM 850 based computer and e-mail it to someone using OEM 437, then many extended characters will not be convertable, and will "look wrong". And in any case, both OEM 437 and OEM 850 are not ASCII.
A good source or information on this and more is here: http://www.joelonsoftware.com/articles/Unicode.html
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.BiloBeauty.com
http://www.autismspeaks.org