Unicode Euro Symbol

jamesjames Member Posts: 56
Has anybody had to deal with the Euro Symbol via a UTF-8 XML file

I am trying to convert it in Navision and I have used the Ansi2Ascii download on here and even after tweaking it is coming through as three characters Ëé¼ and then being converted to âé¬

Does anyone have any idea how to convert this in Navision or what the Ascii key is (I know it is ALT + 0128 on the keyboard), I've been racking my brains but I can't fathom out an answer ](*,) ](*,)

Any help would be greatly appreciated!

Thanks
James

Answers

  • leugimleugim Member Posts: 93
    james wrote:
    Has anybody had to deal with the Euro Symbol via a UTF-8 XML file

    I am trying to convert it in Navision and I have used the Ansi2Ascii download on here and even after tweaking it is coming through as three characters Ëé¼ and then being converted to âé¬

    Does anyone have any idea how to convert this in Navision or what the Ascii key is (I know it is ALT + 0128 on the keyboard), I've been racking my brains but I can't fathom out an answer ](*,) ](*,)

    Any help would be greatly appreciated!

    Thanks
    James

    hi.

    create a new global variable with char datatype
    assing value 176 to that variable
    you can see € symbol if you set the char variable as srcexpression in a text box

    hope this could be helpful
    rgds
    _______________
    so far, so good
  • jamesjames Member Posts: 56
    Thanks for the response.

    When I assign 176 to this GV it returns a square?

    The problem that I have is identifying the value that comes in from the UTF-8 xml file, the value is coming in as Ëé¼ and was wondering if anyone else has received the Euro symbol via xml as I need to then get Navision to convert this value to the Euro symbol and as you can see I can't see the woods from the trees for some reason!! :-k
  • leugimleugim Member Posts: 93
    james wrote:
    When I assign 176 to this GV it returns a square?

    i don't know why you see a square... maybe windows language but ASCII is ASCII, isn't it? mmm... :-k yesterday I made a form to test what I said, with two text boxes and two buttons.

    sourceexpr for txtbox1: the char GV
    sourceexpr for txtbox2: an integer GV
    onpush in button1: char := integer + 1;
    onpush in button2: char := integer - 1;

    with this simple form you can type in txtbox2 an integer and see the ASCII value in txtbox1, and go forward or backwards with buttons
    james wrote:
    The problem that I have is identifying the value that comes in from the UTF-8 xml file, the value is coming in as Ëé¼ and was wondering if ...

    you can define a new simple function asking for value 'Ëé¼' and changing it to '€'...

    take a look at this

    http://www.mibuso.com/forum/viewtopic.php?t=1774

    and this

    http://www.mibuso.com/dlinfo.asp?FileID=287

    rgds[/url]
    _______________
    so far, so good
  • jamesjames Member Posts: 56
    Thanks leugim. It must be that Navision does not recognise, as it does this on a number of values (i.e. 1 to 14 are showing this).

    Anyway, it seems that 177 is showing the Euro symbol? I have a function that converts Sterling correctly, so I will use this for the Euro symbol. Otherwise like you said I will have to use some logic to intepret the Ëé¼.

    Thanks for the links, I have used this convertor and it works well, except for the Euro symbol unfortunately and cheers for your help.

    If I get to the bottom of it, i will post the solution
  • ajhvdbajhvdb Member Posts: 672
    I think you need to look at the used character set in Regional settings.
  • jamesjames Member Posts: 56
    I finally sorted out the issue with the Euro Symbol by creating a seperate function and defining the Euro Symbol.

    Then when the details of the xml file are read, the value Ëé¼ is converted to the Euro Symbol as suggested on here - this is done via a seperate function which matches the read value (from the xml) to the defined value ( i.e. Ëé¼).

    If it does, then it converts this value to the Euro Symbol.
  • ajhvdbajhvdb Member Posts: 672
    edited 2008-03-12
    Thx, for updating this.

    I don't really understand your explanation. Could you share some code or give an example?
  • jamesjames Member Posts: 56
    Sure, no problem.

    I've defined a new GV called EuroSymbol and set it's value in the function

    EuroSymbol := 177;

    Then I have called a function MatchText further in the code with 5 parameters

    MatchText ('Ëé¼ ', FORMAT(EuroSymbol), InputText, OutputText, i);

    It is effectively in a loop, so checks every value. This is the code in the MatchText function

    sLen := STRLEN(matchTxt);
    match := COPYSTR (InputText, i, sLen) = matchTxt;
    IF match THEN BEGIN
    OutputText := OutputText + repChar;
    i := i + sLen - 1;
    END;
    EXIT (match);

    Where matchTxt is the first parameter (Ëé¼ ) and repChar is the second parameter (FORMAT(EuroSymbol)).

    Hope this makes sense as there is a lot more going on than this!
  • chrisdfchrisdf Member Posts: 82
    I recently had a problem where I was trying to export data to a text file that include the Euro Symbol (€) and the pound symbol (£). These sysmbols were appearing as strange characters in the output file.

    I read this thread to find a solution but none of the suggestions quite solved the whole problem. The ANSII->ASCII converter solved the £ problem but not the € problem.

    In the end, the solution I found was as follows:

    1. Define a variable of type Char (CharVar)
    2. Assign this variable:
    CharVar := 0163; for £ symbol
    CharVar := 0128; for € symbol
    3. Write to text file using FORMAT(CharVar)

    This worked for me on a UK system with Codepage set to 437 (Western Europe).
Sign In or Register to comment.