NodeJS系列~第二个小例子,解决中文乱码的问题
为了使页面支持的字符更多,所以编码使用UTF-8,注意,你的原js文件的编码也要是utf-8的,可以通过记事本进行编码的修改
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjwAAAFGCAIAAADhPNL3AAAgAElEQVR4nO2deXgT5722da7vfN/p6XJO0zZNmjSnoW6StkmTpmnTNQmBOOmWrSTNyb6RlpKFNUAAgw1eAGN2GwwYzGKzGmPwvkiWte/baJclebfBZguEtE2q74+RZVmzaCTZlsZ+nuu+5hqP3nnn1Whmbv1Gsi0IIAiCIAhPIiCMSgAAAIAXQFoAAAB4g4AwKjOTlKyEsybhrE042QknJ+HkJpy8xLIu4axPOBsSTn7C2ZhwChLOpsSyOeFsSThbE862hLM94exIOIWJpSjh7Ew4uxJOMSWM0lq9fTfLFNKCtCAtSAvSgrRSQlpFUv3jf/qzsmcw/elZQv9A+tOzqtw96U/POmztSH961kaltUBq3JYzB9KCtCAtSAvSgrSSLK21OTkbpSbPhY/tg5eNAxdVvUPirvP1vv5Kd0+ZraPE7M0W6/Mlhq3Zb0JafJcWeYM4JmmRq0SVFtkM0oK0IC1Ia9yltb6oeLtU7xq6bD13Wd93Qd49KOwYqGnvrXB1HbL5dxvbM1s0JVo7pDUJpBXuLeqnneGWYgfSgrQgLUgradLKP1ZZIlYrvV2S9k6hy19r81Za3EcMjv06W5HSki8xLDjVdFRnTWVphS6mEfOxSiu0bvg8+eMESIvc1nhLKxT2ciq0hDrD3W2QFqQFaUFa4yCthraDQpn53CVd/wVF71Br50Cdr6/S3V1u7yix+Lbq3IvOthn7h1JKWlQtRUgr7korwlITKa2JqbRikhZTNYZKC9KCtCCtpElrXav2cJNY7Olsdvprbd5TFvdRg7NUZy9SEptl5rWtujnlNb6BQUiL79IKd09UacX0mRb36grSgrQgLUgrMWmtWbu+Tb+/QaTuG5J1nxd2DNR6+ypd3eX2jn0Wb6GhPVdBLK2Vfv6vf4WkRV6bDBpJ6DoV6oy6JHwhYVRmZ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H5hNvnCXVrKvl9ETm7Rod8eMGTNmDmfGjBkT/GLwIkk/bwGYsggQgUDATVrJvlJySmzSAgAAAJIIpAUAAIA3QFoAAAB4A6QFAACAN0BaAAAAeAOkBQAAgDdAWgAAAHgDpAUAAIA3QFoAAAB4A6QFAACAN0BaAAAAeAOkBQAAgDdAWgAAAHgDpAUAAIA3BKWV7P+QgiAIgiDRIyB48j9UEARBEERAhP1LeOpNQtJsEcsj2mOKKaaYYorpxEzZpBUqx6jLp0+fngqjxxRTTDHFdEpNGaUVfg8xfDm1PaaYYooppphOzBSVFqaYYooppryZ4jMtTDHFFFNMeTONIi3y0YjlqLQwxRRTTDFNyjS6tKjLUWlhiimmmGKalCknaRGU2guVFqaYYoopphM/jV9aqTB6TDHFFFNMp9T0/wP7GC9cFB8qoAAAAABJRU5ErkJggg==" alt="" />
然后在你的js服务端添加网页响应头信息,把charset:utf8添加到头中,代码如下
function start(response, request) {
var getQuery = url.parse(request.url).query;
var getData = qs.parse(getQuery); //getData数据
var body =
'<form action="/upload" enctype="multipart/form-data" ' +
'method="post">' +
'选择文件:<input type="file" name="upload" multiple="multiple">' +
'<input type="submit" value="Upload file">' +
'</form>';
response.writeHead(, { 'Content-Type': 'text/html;charset=utf-8' });
// response.write(getData["jsonpcallback"] + "({result:'" + body + "'})");//输出json
response.write(body);//输出字符串
response.end();
}
当然访问这个页面时,中文就可以顺序的显示出来了,呵呵
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjYAAAD1CAIAAADMNyhRAAAMF0lEQVR4nO3dP48c5R3A8X0j6elXJwshoTUFMkKgVOgU3FguEFQUSKFcCREKCqQLCl1QKDDvIEgIhzQOV9ii2LgIIQTJTSjYl3ApVqzGOzPPPLPz7M5v9j6PPsXt3PzHPF/P3vlutv5lDQABzUY/AwBoJFEABCVRAAQlUQAEJVEABCVRAAQlUQAEJVEABCVRAAQlUQAEJVEABCVRAAQlUQAEJVEABCVRAAQlUQAEJVEABCVRAAQlUQAEJVEABC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ARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQlEQBEJREARCURAEQVIFEvf322383DMMwjNJjaKL0yTAMwzjQGJooADgQiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCICiJAiAoiQIgKIkCIKjDJurxPx9/8qdP7t69e35+/txzz83n89dee+38/PzDDz/85m/fjH7xAER2qETd//r++fn5PDleeOGFz/7y2c//+3n0uwBAQOUT9cO/f3jjjTfScaqOV155pcgT1Sxj1NdPL0l8Nr0yAMMVnmQfPXz00ksv5fdpM27cuPHFvS/KXE92eA6XqL6xBKBRybny0cNHzz//fN8+bcenf/60wPXsm6jOPt25cyezOr1eAtCm2Fz5439+3OP5qTrOzs6++uqrodeTkaidtNy6dau6WmNCNolK77btUxIFsJ9ic+Vbb701pE+bsVgsfvrvT4OuJ+8paidIOVHxFAVwZGXmyvtf3+/Mz5tvvnlxcfH++++nV/vgDx8Mup4BiWqszmw2u/f5vWqi6rttjFBmzwBoU2auTHx/+auvvnp5eXn167i4uEgn6saNG9//6/vel5E9qutvPti80de4w+rLvonKfAlAmwJz5eW3l+mHp6urq8ePH29C1Zmo+Xz+8R8/3v96agFIL2lLVH233ugDOLICc+VHH32U6M3Nmzdv3rw5n88vLi4yE/X6717f/3oyErWuPUWlk7OufLtEdcO20qRLJlEAmQrMlXfv3u2sTq9EnZ2d7f0jJzITta6EpL5OIlHrpwuUcw6eogD2U2CufPHFF8smaj6fP3r4aJ+LST4wJdbvlaj0Pjv3JlEAmQrMlc8++2zxRO33I5F6JWr7JPTee+8VfIrqfIyTKIBMBebKs7Oz4om6//X93leS3Yz1089P20TtjJ31d74Wta60Kn04iQLYT4G5crFYFE/UgwcP+l1G+7xfpCKz2jed76w8a3rDsG1NiQLIUWCuvH37dvFEDfwZEwCcgAKJWi6XZRP18ssvj35fABhdgUR9+dcvE725ffv25eXl5eXlkydPrq6unjx5snmZePZaLpej3xcARvd/zxkIbI9mP1UAAAAASUVORK5CYII=" alt="" />
小知识,一般为了隐藏图像文件的地址,或者统一为图像添加某些信息(如文字,水纹等),我们会通过一个网页来响应图像文件,你可以将图像ID传入网页,然后网页以 "Content-Type": "image/jpg"的格式进行响应即可
//显示图像
function show(response, request) {
console.log('request handler \'show\' was called...')
console.log("read image:" + filename);
fs.readFile(filename, "binary", function (error, file) {
if (error) {
response.writeHead(, {
"Content-Type": "text/plain"
});
response.write(error + "\n");
response.end();
} else {
response.writeHead(, {
"Content-Type": "image/jpg"
});
response.write(file, "binary");
response.end();
}
});
}
结果如图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqwAAACOCAIAAAB7W81zAAAXkklEQVR4nO2dW5McxZXH+5nv4Df2wS/7GXjUJ3AAM7IhFu8DEY7w225gx3KTpgcHuwZhaUbipl1A4iZpRiMJ2F1zcbCGxZiL3ctFQoiLJC7qrhG6zWi6K3MfxrSKysxTWVXZXdVdvxO/6KjJyjx5q6rzr+zqmtZqtAqF6bz3pta6896bBbjrrrtuuOEGXRtrtVqZKU22akeDucCaaa2EpVLMnJk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IQAQAA0FAQAYgAAABoKIgARAAAADQURAAiAAAAGgoiABEAAAANBRGACAAAgIaCCEAEAABAQ0EEIAIAAKChIAIQAQAA0FAQAYgAAABoKIgARAAAADQURAAiAAAAGgoiABEAAAANBRGACAAAgIaCCEAEAABAQ0EEIAIAAKChIAIQAQAA0FAQAYgAAABoKIgARAAAADSU/wcdP5DAgOkfiAAAAABJRU5ErkJggg==" alt="" />
NodeJS系列~第二个小例子,解决中文乱码的问题的更多相关文章
- NodeJS系列~第一个小例子,实现了request.querystring功能
返回目录 百度百科上: Node.js是一套用来编写高性能网络服务器的JavaScript工具包,一系列的变化由此开始,在Node中,Http是首要的.Node为创建http服务器作了优化,所以在网上 ...
- nodejs 写服务器解决中文乱码问题
nodejs 写服务器解决中文乱码问题:https://blog.csdn.net/worldmakewayfordream/article/details/77483423 本文链接:htt ...
- java web 中有效解决中文乱码问题-pageEncoding与charset区别, response和request的setCharacterEncoding 区别
这里先写几个大家容易搞混的编码设置代码: 在jsp代码中的头部往往有这两行代码 pageEncoding是jsp文件本身的编码contentType的charset是指服务器发送给客户端时的内容编码J ...
- jquery插件导出excel和pdf(解决中文乱码问题)
参考文件:http://jackyrong.iteye.com/blog/2169683 https://my.oschina.net/aruan/blog/418980 https://segmen ...
- JavaWeb_(Struts2框架)Log4j的配置以及解决中文乱码
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- Web---演示servlet技术(servlet生命周期),解决中文乱码问题
本节讲解决中文乱码问题的4种方法. 还有更好的方法,也就是用过滤器,这里就不演示了,博主目前也不会~呼♪(^∇^*)~过段时间才会学. servlet生命周期演示: index.jsp: <%@ ...
- php如何解决中文乱码问题?
为什么会出现中文乱码? 很多新手朋友学习PHP的时候,发现程序中的中文在输出的时候会出现乱码的问题,那么为什么会出现这种乱码的情况呢?一般来说,乱码的出现有2种原因,一种是由于编码(charset) ...
- 关于web.xml中配置Spring字符编码过滤器以解决中文乱码的问题
当出现中文乱码问题,Spring中可以利用CharacterEncodingFilter过滤器解决,如下代码所示: <!-- Spring字符编码过滤器:解决中文乱码问题 --> < ...
- 在PHP中PDO解决中文乱码问题的一些补充
我的环境是appsver包, 在网上最常出现的解决中文乱码显示的代码是: 第一种:PDO::__construct($dsn, $user, $pass, array (PDO::MYSQL_ATTR ...
随机推荐
- js原生实现选项卡功能
选项卡在js中是一个重要的知识点.他没有那么难,但在工作中却有重要的位置.几乎在每一个网站都能看到选项卡的实例.所以今天写一下选项卡的实现. 我们设想有三个按钮分别来控制三个盒子当我们点击当前的按钮的 ...
- 原生态jdbc的应用技术
为了更好的了解jdbc,最近查阅了前期学习的资料,整理归纳了一下,整理出来了一套jdbc常用的工具类.之所以在这里撰文,一来可以和大家共享技术的魅力,二来可以方便以后的查阅方便.以下是一个jdbc的优 ...
- Alamofire源码学习
Core文件夹: Alamofire.swift - - - 该文件中主要是给用户提供一些便利的调用方法,用户可以直接调用该文件中的便利方法来使用Alamofire相关功能. ...
- JavaScript 基础第五天
一.引言 前面我们讨论了函数的一些基本概念,因为函数在任何一门语言之中都是很重要所以还是要好好学.昨天打开博客的时候看到有人私信我的JavaScript写错了,我定睛一看果然写错了.对此我表示很抱歉, ...
- C#打开关闭数据库连接
一.忘记sqlserver密码时,运行语句,可修改密码,记得查看账户是否被禁用 EXECUTE sp_password NULL,'输入新密码','sa': 二.代码:data source一定要加上 ...
- sql查询重复记录、删除重复记录方法大全
查找所有重复标题的记录:SELECT *FROM t_info aWHERE ((SELECT COUNT(*)FROM t_infoWHERE Title = a.Title) > 1)ORD ...
- ZabbixCPU温度监视-Centos
ZabbixCPU温度监视 1, lm_sensors安装 #yum install lm_sensors … #sensors-detect 出来的选项全部选yes 重启服务器 2, lm_sens ...
- 【Hello CC.NET】巧用模板简化配置
从 <[Hello CC.NET]CC.NET 实现自动化集成> 到 <[Hello CC.NET]自动化发布时 Web.config 文件维护> ,大神在评论里提到的方案还没 ...
- PostgreSQL基础整理(三)
1.触发器 有更新操作时记录一条日志 DROP FUNCTION IF EXIST log_test(); CREATE OR REPLACE FUNCTION log_test() RETURNS ...
- Visual Studio 2015 RC版官方下载(ISO)
微软Build2015开发者大会发布了下代开发套件Visual Studio 2015 RC候选版,覆盖企业版.专业版以及免费授权的Community社区版,原生支持开发通用型Windows Apps ...