Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I properly display Vietnamese characters in ColdFusion?

I having a hard trying to properly display Vietnamese text in ColdFusion. I've proper charset set to UTF-8 but still no luck. The same texts work fine in a HTML page. What else am I missing? Any suggestion would be much appreciated.

Html: enter image description here

ColdFusion: enter image description here

Thanks!

like image 261
user281867 Avatar asked Feb 24 '23 15:02

user281867


1 Answers

There are two things you need to watch out for, as far as I recall of the top of my head.

The first is to ensure that the .cfm file itself is saved as UTF-8 - this is a file system option, and will probably be settable in your editor. This ensures that the UTF-8 characters are correctly preserved when saving the file.

The other is that every .cfm file that includes 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.

like image 52
sebduggan Avatar answered May 07 '23 00:05

sebduggan