Coldfusion Combined with Access Chinese display problem
Author: Kyle 12/11/02
content:
First, add the following code at the top of the page where you want to pass and process Chinese (it can also be placed in it, but there will be problems in some cases):
<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 use CFPageEncoding in the menu Insert to insert the above code (confirm that the region settings of your Windows system are simplified Chinese).
The above steps are required regardless of whether you use the database or not, as long as you want to process Chinese variables.
Let’s solve the problem of Ms Access.
The default configurations of CFMX's ODBC service, and ODBC Socket Driver do not support double-byte characters, so even if you add the above code to only solve the problem of CFMX handling Chinese, all Chinese transmitted to ODBC will still have problems. To make ODBC service and ODBC Socket Driver support Chinese, the default mode must be modified. The method is as follows:
Confirm that the service service in the system is ColdFusion MX ODBC Agent and ColdFusion MX ODBC Server services.
Find the path to your cfmx installation. If it is c:\Cfusionmx, run this line of command at the dos prompt.
c:/cfusionmx/db/slserver32/admin/ OS (note that OS is capitalized)
If successful, there will be the following prompts:
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 ColdFusion MX ODBC Server services, or re-activate the system.
At this time, there is really no problem using Chinese in ms access. The above methods were both successful on winnt4+cfmx+access97 and win2k server+cfmx+access2002.
Note: If you want to restore the original settings, run the following command:
c:/cfusionmx/db/slserver32/admin/ default
Let's see the example here
:8500/study/
Some other things to pay attention to in Chinese in cfmx
cfmx is not allowed to use Chinese as file names
Of course, you cannot use file names with Chinese in cfinclude, etc.
You cannot use Encrypt and Decrypt to process Chinese
Author: Kyle 12/11/02
content:
First, add the following code at the top of the page where you want to pass and process Chinese (it can also be placed in it, but there will be problems in some cases):
<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 use CFPageEncoding in the menu Insert to insert the above code (confirm that the region settings of your Windows system are simplified Chinese).
The above steps are required regardless of whether you use the database or not, as long as you want to process Chinese variables.
Let’s solve the problem of Ms Access.
The default configurations of CFMX's ODBC service, and ODBC Socket Driver do not support double-byte characters, so even if you add the above code to only solve the problem of CFMX handling Chinese, all Chinese transmitted to ODBC will still have problems. To make ODBC service and ODBC Socket Driver support Chinese, the default mode must be modified. The method is as follows:
Confirm that the service service in the system is ColdFusion MX ODBC Agent and ColdFusion MX ODBC Server services.
Find the path to your cfmx installation. If it is c:\Cfusionmx, run this line of command at the dos prompt.
c:/cfusionmx/db/slserver32/admin/ OS (note that OS is capitalized)
If successful, there will be the following prompts:
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 ColdFusion MX ODBC Server services, or re-activate the system.
At this time, there is really no problem using Chinese in ms access. The above methods were both successful on winnt4+cfmx+access97 and win2k server+cfmx+access2002.
Note: If you want to restore the original settings, run the following command:
c:/cfusionmx/db/slserver32/admin/ default
Let's see the example here
:8500/study/
Some other things to pay attention to in Chinese in cfmx
cfmx is not allowed to use Chinese as file names
Of course, you cannot use file names with Chinese in cfinclude, etc.
You cannot use Encrypt and Decrypt to process Chinese
12345Next pageRead the full text