佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 839|回复: 3

救命! 不能retrieve中文字from mysql DB!

[复制链接]
发表于 5-8-2007 08:52 AM | 显示全部楼层 |阅读模式
小弟已经在connection string 加了CHARSET=utf8 , 但依然不能将中文字insert into mysql DB
显示在DB的尽是 ??????

过后我manually keyin 中文字在mysql DB, 但显示出来的record也一样是????
我已经在每一页加了
CodePage="65001"
-------------------------------------------------------------------
<%@ Page Language="VB" CodePage="65001" AutoEventWireup="false" CodeFile="result_detail.aspx.vb" Inherits="frontend_result_detail" %>

同时也在page_load放了
        Session.CodePage = 65001
        Response.Charset = "utf-8"
-------------------------------------------------------------------

    Dim ConnStr As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _
                "SERVER=localhost;" & _
                "DATABASE=db_customer;" & _
                "UID=user;" & _
                "PASSWORD=password;" & _
                "OPTION=3;" & _
                "CHARSET=utf8;"



请可以懂得解决这个问题的朋友帮助我一下
回复

使用道具 举报


ADVERTISEMENT

manchoy 该用户已被删除
发表于 6-8-2007 11:14 AM | 显示全部楼层
你有在 DB column 里 defined 你的 collation as UTF 吗?看图请按链接

http://bayimg.com/IAFkmAABE
回复

使用道具 举报

 楼主| 发表于 6-8-2007 06:42 PM | 显示全部楼层
谢谢你的建议。。 但我已经作了这个更动但还是不行

请问谁有相关的资料可以给我做以下的东西吗?
storing the chinese character in hex before insertion and decode it while displaying after retrieving from the database.
回复

使用道具 举报

manchoy 该用户已被删除
发表于 7-8-2007 10:41 AM | 显示全部楼层
原帖由 counterking 于 6-8-2007 06:42 PM 发表
谢谢你的建议。。 但我已经作了这个更动但还是不行

请问谁有相关的资料可以给我做以下的东西吗?
storing the chinese character in hex before insertion and decode it while displaying after retrievin ...


以下是我在DB的data,设定了collation

http://bayimg.com/GAfLKAAbF

那些就是UNICODE.你的游缆器有把character encoding 设订去 UNICODE(UTF8)吗?如果是手动去输入中文字,应该没问题
去参靠一下:
http://www.w3.org/International/O-HTTP-charset
http://lists.evolt.org/archive/Week-of-Mon-20051017/176877.html
http://forums.asp.net/t/1108657.aspx
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 14-9-2025 09:37 PM , Processed in 0.120630 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表