19
Views
9
Comments
Is possible change the charset?

Hi.

The default encoding of my site is "UTF-8" and I need to change to Western. Is this possible?

I appreciate all help.

Thanks for all.

Rank: #64

Hi Angelo,


Do you mean the website or the database?

What do you see which is not encoded on the way you want, is it data from the database or the static information as well?


If it is the information database, this has to do with the Collation of your database (read more here).

If you are working on an on-premises infrastructure with access to the database you can change that but if you are working in an OutSystems cloud, you cannot change that (you can open a ticket on OutSystems Support if they can do it but I doubt it).


Regards,
João 

Rank: #6525

Hi João.

Thanks for your answer.

I need change this <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

My cenario is:

An external application (Classic ASP) do a submit for my application (outsystems), but the external application use western encode, so I have some problems with special character.

I try use the decode functions, but not working. This is my problem.

Thanks for all.

Best regards.

Rank: #64

Hi Angelo,


Ah, I misunderstood.

If what you need is to change that value of that tag, I'd say you can define this on the Preparation of our Layout, so it will apply to every screen.

For that, you will have to use the AddMetaHttpEquivTag action from HTTPRequestHandler extension:


With that action, you should be able to change the value of that meta tag.


Regards,
João

Rank: #6525

Unfortunately, not work

Look, the first is the new meta and the second is the old. The function not change just create a new meta on begin.

But I have a new way to search the solution, my challenge now is how remove the second meta tag.

Thanks.


Rank: #64

Hi Angelo,


I thought it would also change if it was already there.

What you also can do is leverage on Regex to perform the switch of the value you want n HTML, using AddPostProcessingFilter action from HTTPRequestHandler:


With that, you can have your matchingRegexp with the value of the current tag and on the replacement the new value.

Rank: #6525
Rank: #6525

Hi João.

Your solutions works, it was possible change the charset, but I still have problem with special characters. It's like the browse ignore the new charset.

So, I think I need another solution.

Thanks for your help and your time.

Best regards.

Rank: #64

Hi Angelo,


Have you debugged and checked if the data is not coming from the database already incorrectly encoded and it is when displaying on the browser that the encoding messes up?

Just to make sure you're tackling the right thing because if the problem is on the data coming, no change at screen-level will make it work.

Rank: #6525

Yes. I did it. 

I talked with the asp classic team, and they are thinks maybe is better send the informations in UTF-8, because this is the outsystem default encode. 

I get the value using:

GetFormValue("NomeEstabelecimento")

And here I already have problem. In debug shows wrong character.

So, I appreciate your help, thanks for all!

Best regards.