Ansi-Ascii converter

Administrator
Member, Moderator, Administrator Posts: 2,506
Ansi-Ascii converter
Convert ANSI characters to ASCII and back!
http://www.mibuso.com/dlinfo.asp?FileID=287
Discuss this download here.
Convert ANSI characters to ASCII and back!
http://www.mibuso.com/dlinfo.asp?FileID=287
Discuss this download here.
0
Comments
-
Hi,
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!
Andras0 -
Hi,
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 20080 -
I got the same problem: did you manage to find a better way?
Thanks,
Zin0 -
Hi,
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,
MichaelMSDynamicsNAV 2009 Build 32012 Classic Client
MS SQL Server 20080 -
Verry nice and usefull,
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?0 -
guenther wrote:[...] I still use the codeunit 99999 this was delivered by Navision. [...]
(Have a look in the documentation header ;-) )Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Actually this codeunit works just fine!
Perfect job!Marcelo Borges
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com0 -
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!If you can't join them, beat them.0 -
I'm confused :? :shock:
If I import I need Ansi2Ascii
If I export I need Ascii2Ansi
Correct? YES
See: http://www.mibuso.com/forum/viewtopic.p ... ascii2ansi0 -
-
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?0 -
Try this one: viewtopic.php?f=23&t=32912&p=160747#p160747
looks easier to implement (with less characters)0 -
kiyac wrote: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);
EDIT: Here I exported the updated one I found
http://savatage99.googlepages.com/CU501 ... verter.txt0 -
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.
A good source or information on this and more is here: http://www.joelonsoftware.com/articles/Unicode.htmlDean McCrae - Senior Software Developer, NAV Server & Tools
This posting is provided "AS IS" with no warranties, and confers no rights.0 -
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.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