Hi all,
I need to check if encoding of forms, input fields,... from the screen are UTF-8 or anything else, and after save data, the encoding still UTF-8 or change to something. How to I check it in Outsystems?
Thanks,
Base on your case, the problem is the inconsistency in character encoding between the user input and the database storage. Storing UTF-8 encoded text in a UTF-16 encoded field will lead to data corruption.
Have you checked if the database configure to support UTF-8 ?
If you want to check the exact encoding type of user data before submitting, you can JavaScript code to check.
My opinion is to check database configure, ensure that the database field where the text is stored uses the same encoding (UTF-8).
Hi
In OutSystems the Content-Type header is typically managed by the platform and is not something that we would set manually. It automatically sets the Content-Type header to text/html; charset=utf-8 for web pages, which is the standard for modern web applications.
If you are looking to verify the Content-Type header for application a, you can check it using the browser developer tool or you can check it by view source and look into meta "content-type".
By using browser developer tool
->Right-click on the page and select "Inspect" to open the developer tools
->Navigate to the "Network" tab.
->Refresh the page to capture the network traffic.
->Click on the initial HTML document request in the list of network requests.
->Look at the response headers for the Content-Type. It should indicate text/html; charset=utf-8.
Hi,
Is this a validation in Frontend ? If data is not UTF-8 encoded, then prevent saving the data.
Or You need to know the exact encoding type ?
Nam
Yeah, I need to know the exact encoding type of data when user input in the screen and save to DB, is there anyway to check the process if encoding change (if has).
Example: User in put in the screen 'A' with utf-8 -> screen get utf-8 -> save to DB with utf-16.
in this case I can't check the change happened even debug, how to know it?