码厩技术博客

coding in a complicated world

LOGO
  • 文档
    ECMAScript 技能表 uwsgi Linux C/C++编程一站式学习 Go Web 编程 PyWin32
  • 工具
    Swagger Editor 字体编辑器
  •  留言
  •  缓存
  •  关于我
  •  Markdown
最新
    日期
    • 1月
    • 2月
    • 3月
    • 4月
    • 5月
    • 6月
    • 7月
    • 8月
    • 9月
    • 10月
    • 11月
    • 12月
    • 2011年
    • 2012年
    • 2013年
    • 2014年
    • 2015年
    • 2016年
    • 2017年
    • 2018年
    • 2019年
    • 2020年
    • 2021年
    • 2022年
    一二三四五六日
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    标签 >>>

    #2 JavaScript Unicode 问题

    JavaScript Web前端 字符编码 乱码问题 Unicode 2019-06-20

    #1 Python 输出 Unicode 字符到标准输出时遇到 UnicodeEncodeError

    Python Unicode 字符编码 2016-06-22

    源代码:

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    
    print u'中国'
    

    报错:
    Traceback (most recent call last):
    File "test.py", line 4, in <module>
    print u'中国'
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
    

    • 1
    TotalNum: 2 , PageSize: 15

    © 2015 码厩技术博客 | 鄂ICP备15002462号-1 [ChinaZ] | 站点地图

    CompiledAt: 2022-06-29 14:51:50 ( d8e530 )