Coldfusion with Access Chinese display issues
Author: Kyle 12/11/02
Content:
First, add the following code to the top of the page where you want to pass and process Chinese (you can also put it in the application.cfm, but in some cases it will be problematic):
<cfprocessingdirective pageencoding= "gb2312" >
<cfcontent type= "text/html; charset=gb2312 ">
<cfset setencoding ("URL", "gb2312") >
<cfset setencoding ("Form", "gb2312") >
Note: If you use Dreamweaver MX, you can insert the above code with cfpageencoding in the menu insert (Verify that your Windows system is in Simplified Chinese).
The above steps whether you use a database or not, as long as you want to deal with Chinese variables are required.
The following addresses the problem with Ms Access.
CFMX ODBC service, and ODBC Socket driver default configuration does not support double-byte characters, so even if you add more than the code to solve the problem of CFMX to deal with Chinese, all upload to ODBC Chinese still have problems, to let ODBC Service and ODBC Socket driver Support Chinese, you must modify its default mode as follows:
Verify that the ColdFusion MX ODBC Agent and the ColdFusion MX ODBC Server Services Two service are in the system.
Find the path to your CFMX installation, and if it's c:\Cfusionmx, run this line at the DOS prompt
C:/cfusionmx/db/slserver32/admin/setcp.bat OS (note OS is uppercase)
Successful, there will be the following tips:
DataDirect Sequelink Manager Version 5.2 (build 0092)
(c) Copyright 1995-2000 Merant, Inc., All rights reserved
Then reactivate the ColdFusion MX ODBC Agent and the ColdFusion MX ODBC Server Services two service, or reopen the system.
At this time in MS Access in Chinese is really no problem the above methods in WINNT4+CFMX+ACCESS97 and Win2K server+cfmx+access2002 are successful.
Note: If you want to restore the original settings, run the following command:
C:/cfusionmx/db/slserver32/admin/setcp.bat Default
To see the example here
Http://vvjohn.dyndns.org:8500/study/chinese.cfm
Other places to pay attention to in Chinese CFMX
CFMX not allowed to do filename in Chinese
And, of course, you can't use the file name with Chinese in Cfinclude.
Can not use encrypt and decrypt to handle Chinese
current 1/5 page
1 2345 Next read the full text