How to display Vietnamese characters in ColdFusion?

I have a difficult attempt to correctly display Vietnamese text in ColdFusion. I set up the kit for UTF-8 correctly, but still no luck. The same texts work fine on an HTML page. What else am I missing? Any suggestion would be greatly appreciated.

Html: enter image description here

ColdFusion: enter image description here

Thanks!

+4
source share
2 answers

There are two things you need to remember as far as I remember about the top of my head.

First, make sure that the .cfm file itself is saved as UTF-8 - this is a file system option and will probably be installed in your editor. This ensures that UTF-8 characters are saved correctly when saving the file.

Another is that every .cfm file containing any UTF-8 text should start with:

<cfprocessingdirective pageencoding="utf-8" /> 

This ensures that ColdFusion delivers the page to the browser in the correct format.

+8
source

To be sure that when displaying working HTML, you can check the page encoding used by your browser (i.e. in FireFox you can right-click + the Info page). Perhaps your text is not UTF-8 encoded, which may explain the problem ...

0
source

Source: https://habr.com/ru/post/1346409/


All Articles