Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi,

I´ve faced an interest5ing requirement recently. We had an object coming from a query in which some characters comes wrongly mapped due to a different charcode. What I mean by this :

Should beShown as
ÃÇ
Õå
Ç
Áµ
Ç?
é
âƒ

The table above show , in the first column, what is the real character and the second, how is it shows. Note that this table is just an excert of the real one. In the total, 47 substitutions had to be made.

For instance the text :

VIABILIZAR A AQUISIۂO E APARELHAMENTO
DE 47 âNIBUS, BEM COMO A MANUTEN€ÇO DE
EQUIPE DE PROFISSIONAIS, COM VISTAS ·
IMPLEMENTAۂO DE DIVERSAS AیES
SOCIAIS MEDIANTE ATENDIMENTO MàVEL.

should be

VIABILIZAR A AQUISIÇÃO E APARELHAMENTO
DE 47 ÔNIBUS, BEM COMO A MANUTENÇÃO DE
EQUIPE DE PROFISSIONAIS, COM VISTAS ·
IMPLEMENTAÇÃO DE DIVERSAS AÇÕES
SOCIAIS MEDIANTE ATENDIMENTO MÓVEL.

In order to acomplish it, we use the below formula to, recursively , change all characters :

=Upper(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace([Descrição do Projeto];"Ç";"Ã");"å";"Õ");"€";"Ç");"µ";"Á");"?";"Ç");"‚";"é");"ƒ";"â");"…";"à");"‡";"Ç");"ˆ";"Ê");"Š";"è");"Œ";"î");"“";"ô");"•";"ò");"–";"û");"—";"ù");"";"á");"¡";"í");"¢";"ó");"£";"ú");"¤";"ñ");"¥";"Ñ");"¦";"ª");"§";"º");"µ";"Á");"¶";"Â");"·";"À");"Æ";"ã");"Ò";"Ê");"Ó";"Ë");"Ô";"È");"Õ";"ı");"à";"Ó");"â";"Â");"ã";"Ò");"ä";"õ");"å";"Õ");"ë";"Ù");"ø";"°");"ı";"Õ");"Ò";"Ã");"ÇÇ";"CÃ");Car(160);"Á");Car(201);"É");"õ";"Õ");”â”;”ô”);” Ö”;”Í”))

The idea behind it is that the substitutins are made from the inside out, being  [Descrição do Projeto] the object containig the "wrong" characters. This Replace is used as an argument for the next replace and so on.

Regards,

Rogerio

Labels in this area