dataport export into txt file : wrong characters

bbassbbass Member Posts: 7
edited 2004-06-24 in Navision Attain
I've written an export dataport, where I export some item data.

When executing the dataport, everything works fine in Navision, but in my txt file, the following occurs:

I export for instance the description of an item with value:
10 pièces
In my txt file I find:
10 pi??ces.

This also happens with the following characters: è ö à

Remark: I open the txt file in MS Notepad.

Is this a problem of notepad, or is Navision causing this? And how can I fix it?

Any idea?

Comments

  • SavatageSavatage Member Posts: 7,142
    does it have to be (è) can you find & replace it with a regular (e)?

    that might be the easiest fix
  • bbassbbass Member Posts: 7
    I really need the characters like "è" because they are frequently used in the descriptions and it is French and replacing it into "e" would be a big mistake :cry:
  • jhoekjhoek Member Posts: 216
    This is clearly a character set issue. Navision writes ASCII, most other Windows apps use ANSI. Search this forum, or mbsonline.org for a conversion function, which looks something like this:

    CONVERTSTR('òëø...', 'öíç...');

    Good luck!
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • bbassbbass Member Posts: 7
    Thanks !

    But I've read that Navision exports the data in ASCII. Notepad/Wordpad doesn't support ASCII, but ANSI.

    So, is there a program that supports ASCII, so that I don't need to do a conversion, and would it then be solved?

    Or do I better convert ASCII into ANSI in Navision?

    What would you suggest?
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I would suggest you take a look at this download to convert ASCII to ANSI and vice versa: http://www.mibuso.com/dlinfo.asp?FileID=287
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • trianta99trianta99 Member Posts: 1
    I had the same problem with greek characters.
    When i tried to upload a *.txt file with greek characters i found in my tables ??&#$.

    so i made to text constants:
    tcFromChars:
    αβγδεζηθικλμνξοπρστυφχψωίόώήάέύΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΈΎΊΌΆΉΏς

    with all greek characters and

    tcToChars:
    ÜÝÞúßüýûþ¢¸¹º¼¾¿±µÚÛ»½°À³àÿ¯­®²??‘’“”•–—˜™š›œ?žŸ£¤¥¦¨©ª†ŒˆŠë‡?´

    with characters that i found in my table when i uploaded my text file.
    (my text file contained the characters in tcFromChars text constants)

    Then i used the following code in my program:
    If the my Application language is greek i use:

    iFieldCode.Description := CONVERTSTR(kadDescr,tcFromChars,tcToChars)


    and if my Application language is English i use:

    iFieldCode.Description := CONVERTSTR(kadDescr,tcToChars,tcFromChars)

    The variable kadDescr contains data from my text file in greek.
  • bbassbbass Member Posts: 7
    Thanks for all the answers! Very helpful
Sign In or Register to comment.