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
0
Answers
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
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
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
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
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
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.
I don't really understand your explanation. Could you share some code or give an example?
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!
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).