使用utf-8的jscript和mysql [英] jscript and mysql with utf-8

查看:87
本文介绍了使用utf-8的jscript和mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,每个人


我正在尝试将旧的vbscript脚本转换为jscript。

这必须在windows脚本主机上运行(不是任何html)。


在完成所有工作后,我意识到当我将数据utf-8编码到mysql表中时,它们的存储位置不正确。


mysql数据库与使用vbscript的数据库相同。


任何想法赞赏

提前致谢。

解决方案

你能发布你的代码吗? JavaScript无法访问数据库,但如果您使用的是JScript / ActiveX,则可以。


感谢您的回复


我忘了写它之前,是的我使用ActiveX:

展开 | 选择 | Wrap | 行号


ActiveX不是我的专业领域,但我可以为您提供指针可以帮助你解决这个问题。 MySQL默认为latin1,所以看看是否有一种方法可用于将字符集设置为UTF-8。 JScript和vbscript代码在数据库连接/ SQL代码方面有什么区别?


hallo to everyone

I''m trying to convert an older vbscript script to jscript.
This has to run on windows script host (not any html).

After i''ve done all the work i realised that when i insert data utf-8 coded into the mysql table, they are not stored correctly.

The mysql database is the same one working with vbscript.

Any ideas appreciated
Thanks in advance.

解决方案

Can you post your code. JavaScript cannot access a database, but if you''re using JScript/ActiveX, you can.


Thanks for replying

I forgot to write it before, yes i use ActiveX :

Expand|Select|Wrap|Line Numbers


ActiveX is not my area of expertise, but I can offer you pointers which can hopefully help you to solve this problem. MySQL defaults to latin1, so see if there''s a method that you can use to set the charset to UTF-8. What difference is there between the JScript and vbscript code in terms of the database connection/SQL code?


这篇关于使用utf-8的jscript和mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆