XMLPort tittles (´) and "ñ" caracter import

txerifftxeriff Member Posts: 500
edited 2015-01-09 in NAV Three Tier
Hi all,

Hope some1 can help.

Does any1 know if we can import csv file containing tittles and "ñ"?


I tried to change textencondig property but seems not working.

Plan B/workaround would be to do a replace but it´s very difficult as each word with tittles has different behaviour after imported:

before importing (csv file):
Vendí. Vendió. ñ

After importing:
VendÝ. Vendi¾. ±


thanks a lot for your help.

edit:

solved. after importing there´s a codeunit some1 passed me, it does the work.
Ansi2Ascii(_Text : Text[250]) : Text[250]
MakeVars;
EXIT(CONVERTSTR(_Text,AnsiStr,AsciiStr));

Ascii2Ansi(_Text : Text[250]) : Text[250]
MakeVars;
EXIT(CONVERTSTR(_Text,AsciiStr,AnsiStr));

MakeVars()
AsciiStr := 'ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»¦¦¦¦¦ÁÀ©¦¦++¢¥++--+-+ãÃ++--¦-+';
AsciiStr := AsciiStr +'¤ðÐÊËÈiÍÎÏ++¦_¦Ì¯ÓßÔÒõÕµþÞÚÛÙýݯ´­±=¾¶§÷¸°¨·¹³²¦ ';
CharVar[1] := 196;
CharVar[2] := 197;
CharVar[3] := 201;
CharVar[4] := 242;
CharVar[5] := 220;
CharVar[6] := 186;
CharVar[7] := 191;
CharVar[8] := 188;
CharVar[9] := 187;
CharVar[10] := 193;
CharVar[11] := 194;
CharVar[12] := 192;
CharVar[13] := 195;
CharVar[14] := 202;
CharVar[15] := 203;
CharVar[16] := 200;
CharVar[17] := 205;
CharVar[18] := 206;
CharVar[19] := 204;
CharVar[20] := 175;
CharVar[21] := 223;
CharVar[22] := 213;
CharVar[23] := 254;
CharVar[24] := 218;
CharVar[25] := 219;
CharVar[26] := 217;
CharVar[27] := 180;
CharVar[28] := 177;
CharVar[29] := 176;
CharVar[30] := 185;
CharVar[31] := 179;
CharVar[32] := 178;
AnsiStr  := 'óÚÔõÓÕþÛÙÞ´¯ý'+FORMAT(CharVar[1])+FORMAT(CharVar[2])+FORMAT(CharVar[3])+ 'µã¶÷'+FORMAT(CharVar[4]);
AnsiStr := AnsiStr + '¹¨ Í'+FORMAT(CharVar[5])+'°úÏÎâßݾ·±Ð¬'+FORMAT(CharVar[6])+FORMAT(CharVar[7]);
AnsiStr := AnsiStr + '«¼¢'+FORMAT(CharVar[8])+'í½'+FORMAT(CharVar[9])+'___ªª' + FORMAT(CharVar[10])+FORMAT(CharVar[11]);
AnsiStr := AnsiStr + FORMAT(CharVar[12]) + '®ªª++óÑ++--+-+Ò' + FORMAT(CharVar[13]) + '++--ª-+ñ­ð';
AnsiStr  :=  AnsiStr +FORMAT(CharVar[14])+FORMAT(CharVar[15])+FORMAT(CharVar[16])+'i'+FORMAT(CharVar[17])+FORMAT(CharVar[18]);
AnsiStr  :=  AnsiStr + '¤++__ª' + FORMAT(CharVar[19])+FORMAT(CharVar[20])+'Ë'+FORMAT(CharVar[21])+'Èʧ';
AnsiStr  :=  AnsiStr + FORMAT(CharVar[22]) + 'Á' + FORMAT(CharVar[23]) + 'Ì' + FORMAT(CharVar[24])+ FORMAT(CharVar[25]);
AnsiStr  :=  AnsiStr + FORMAT(CharVar[26]) + '²¦»' + FORMAT(CharVar[27]) + '¡' + FORMAT(CharVar[28]) +'=¥º¸©'+ FORMAT(CharVar[29]
);
AnsiStr  :=  AnsiStr + '¿À' + FORMAT(CharVar[30]) +FORMAT(CharVar[31]) +FORMAT(CharVar[32]) +'_ ';

Comments

  • vremeni4vremeni4 Member Posts: 323
    Hi,
    Does any1 know if we can import csv file containing tittles and "ñ"?

    Yes, you can do this by selecting the right encoding in the XML Port properties.
    Open XML Port , go to a new line, press Shift+F4 or (View -> properties).
    Take a look at the property Encoding.

    In my opinion there is no need for this conversion as you did it.

    Anyhow the most important bit it works :-)

    I hope this helps.
    Thanks.
  • txerifftxeriff Member Posts: 500
    vremeni4 wrote:
    Hi,
    Does any1 know if we can import csv file containing tittles and "ñ"?

    Yes, you can do this by selecting the right encoding in the XML Port properties.
    Open XML Port , go to a new line, press Shift+F4 or (View -> properties).
    Take a look at the property Encoding.

    In my opinion there is no need for this conversion as you did it.

    Anyhow the most important bit it works :-)

    I hope this helps.
    Thanks.


    enconding was required and some mate did b4. The properties didnt work
Sign In or Register to comment.