As I don't have a developer license, I think I have put myself in a bad position. I downloaded the Ansi <-> Ascii converter tool (
http://www.mibuso.com/dlinfo.asp?FileID=287) as I am importing data into Navision. I need to convert the data as foreign characters look weird in Navision.
I imported the fob file before I noticed that I wasn't allowed to run it (can't run codeunits with the number 99999). Ok, I'll just remove it again I thought, but no, Navision doesn't let me remove it. Bummer. What is my option now? Should I just let it be seeing as it doesn't harm anything directly or pay to have it removed?
Also, seeing as I couldn't run this code unit, I figured I had to recreate the functions in my dataport. I did that by copy-pasting the code, but the converted strings are not working. Probably due to the codeunit being written in a codepage and the copy-paste working in another. So, how do I copy-paste the code so that it works? :-)
Comments
I still have my conversion problem which I am trying to debug..
When calling Ansi2Ascii on a string, all spaces are converted to "ÿ". This is clearly wrong.
Looking at the code I see that the last character in AnsiStr is a space and the last character in AsciiStr is ÿ. CONVERTSTR does what it should and converts space to ÿ, but space should be converted to space...
Also, "Å" is converted to a square (unprintable). Other characters are also causing problems.
I may use it wrongly or my initial copy-paste ruined the characters, but looking in the fob file for my dataport, it looks correct (matches the ansi<->ascii fob file.
Anyway, I am now building my own translation according to the image found on this page:
http://www.torsten-horn.de/techdocs/ascii.htm
This seems to be working well.
This is the mapping I ended up with (is probably not copy-paste proof):
First of all, I'm new here, so greetings to everyone
I know this post is a bit old, but I'm having the same problem with space characters and I haven't found a solution yet.
Could you tell me what you did to solve this?
Thanks in advance.
we had help - some remapping.
here is the C/AL we used in that CU (hopefully not goofed up by copy-paste).