GetProfileString doesn't support unicode format.??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body><cfset currentPath = getCurrentTemplatePath()>
<cfset currentDirectory = getDirectoryFromPath(currentPath)><cfscript>
function udf_Translate(Name, Filename, Section) {
var outText="";// If user selected default language (English), bypass the translation
if (cookie.cookie_language eq "EN")
return Name;
if (Filename eq "")
Filename = "Common";
if (Section eq "")
Section = "Common";
INI_Path = #currentDirectory# & "Language.properties";
outText = GetProfileString(INI_Path, Section, Name);
return IIf(Len(Trim(outText)) gt 0, DE(outText), DE(Name));
}
</cfscript><cfoutput>#udf_translate("Ward", "Inpatient", "")#</cfoutput>
</body>
</html>
Language.properties
[COMMON]
Ward=Phường
It output only "Ward" instead of Phường when I save this file as UFT-8. But, when I save this file as ANSI encoding, it output as Phu?ng. It's wrong. Why GetProfileString doesn't UTF-8 format? Any solutions will be appreciated.
