Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
momofiore
Creator
Creator

how to delete strange character on qlikview like ​​

hello guys.

could somebody help me deleting  some strange characters "​" on qlikview files. they dont really appear in QVD but when i open the QVD file with Notepad ++ specifying encode in  AINSI and Language in VB, they appear.

i tried to delete them in with purgechar or keepchar. they always there.

for example:

On QlikView it appear like this

De : yassine darwich <moha@gmail.com

Date : 6 avril 2018 à​​ 11:46

Objet : site de casa

but when i open the QVD file with Notpad++ it appear like this

De : yassine darwich <moha@gmail.com

Date : 6 avril 2018 à ​​ 11:46

Objet : site casa

you can see the strange characters !!

22 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Could it be that notepad doesn't know how to display à and then shows some encoded values?

Have you tried other editors?

marcus_sommer

What is the usecase to look with an editor like notepad ++ into a qvd and that "strange" chars there will be then a problem?

Beside this I think Steve is right and that these chars couldn't be displayed by the used encoding and so it just showed some placeholder. If there is really a problem with it you need to identify the chars to apply any logics to replace them - and this could be done with Qlik itself by going through these values and grabbing with ord(mid(value, n, 1)) the code-number of the char.

- Marcus

momofiore
Creator
Creator
Author

maybe really i didnt. well i ll explaine more the main problem.

im trying to extracte Date from DescriptionStart:

---------- Message transféré ----------

De : Dominique LATRECHE

Date : 6 avril 2018 à​​ 11:46

Objet : site de lyon

and want the date to be like this form     06/04/2018 11:46:00      , i tried to do this with this line of script:

     MapSubString('MapMonth',Trim(Replace(TextBetween(DescriptionStart,'Date :',chr(10)),' à ',' ')))

but all what i get is this     06/04/2018 00:00:00     , here i m tryin to get all the date with the hours and minutes.

the script gives me the exacte answer for some label of DescriptionStart but for this didnt. and it may the problem from the strange characters.


MapMonth is :

MapMonth:

mapping LOAD *

Inline [

Libelle, CodeMonth

janvier, 01

février, 02

mars, 03

avril, 04

mai, 05

juin, 06

juillet, 07

août, 08

septembre, 09

octobre, 10

novembre, 11

décembre, 12

Jan, 01

Feb, 02

Mar, 03

Apr, 04

May, 05

Jun, 06

Jul, 07

Aug, 08

Sep, 09

Oct, 10

Nov, 11

Dec, 12

] ;


hope to find solution. thanks guys for ur support

momofiore
Creator
Creator
Author

if you have an other way to extract the date to be like this 06/04/2018 11:46:00  i ll be so thankfull

marcus_sommer

With your example the following should work:

timestamp(timestamp#(replace(textbetween('---------- Message transféré ----------

De : Dominique LATRECHE

Date : 6 avril 2018 à 11:46

Objet : site de lyon', 'Date : ', '

Objet : '), 'à', ''), 'D MMMM YYYY  hh:mm'))

Btw. the 'à' is chr(224)

- Marcus

momofiore
Creator
Creator
Author

thanks marcus .

what would be ur solution if  

---------- Message transféré ----------

De : Dominique LATRECHE

Date : 6 avril 2018 à 11:46

Objet : site de lyon

is a label called   DescriptionStart.

thanks again.

marcus_sommer

I think you could just replace this 'text' with your field [DescriptionStart].

If there are more things needed from this multi-line field it might be useful to load it with something like:

subfield(subfield([DescriptionStart], chr(10)), ':', 1) as Label,

subfield(subfield([DescriptionStart], chr(10)), ':', 2) as Value

and to grab from this output your needed information (of course you will need further statements to "clean" these data).

- Marcus

momofiore
Creator
Creator
Author

thanks agian .

yes i tried to replace 'text ' with DescriptionStart and dint work ,in fact my field DescriptionStart  has other information . i didnt put them becaus they are confidential.

---------- Message transféré ----------

De :

Date : 6 avril 2018 à​​ 11:46

Objet : site de lyon

Bonjour

La commande proximity ne peut être livrée ,il lui manque : les données d'expédition

Merci d'avance ,pour votre action.

Bien cordialement

Dominique LA

the problem is still in (d'expédition)  line 6 and (d'avance) line 7

thank you for ur support guys

marcus_sommer

It seems that the problem is the single-quote which is a key-char within the qlik-syntax. Maybe it helps to use something like this: replace(YourField, chr(39), chr(39) & chr(39)) to double them and then qlik treats it as content and not as quotes around any strings.

- Marcus

momofiore
Creator
Creator
Author

thank u again Marcus.

do you know everything works prfectly with     replace(TextBetween(DescriptionStart,'Date :','Objet :' ), 'à', '')Capture3.PNG but  when i try the complet code     timestamp(timestamp#(replace(textbetween(DescriptionStart,'Date : ', 'Objet : '), 'à', ''), 'D MMMM YYYY  hh:mm'))  it shows meCapture2.PNG