jijo-paulose / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

ulipad 保存文件的时候,把编码的声明字符去掉了? #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 用notepad  保存一个 utf-8 的文件
2. 用ulipad 打开,再保存

What is the expected output? What do you see instead?
3. 仔细分析用notepad 保存的utf-8文件 和ulipad 
保存的文件,发现ulipad 自动把前面的
字符为:65279 的声明字符去掉了。 
这,导致在有些运行环境下 会报 Non-ASCII 
character 的错误。  

What version of the product are you using? On what operating system?
3.9

Please provide any additional information below.

Original issue reported on code.google.com by yanzhiju...@gmail.com on 4 May 2009 at 1:40

GoogleCodeExporter commented 9 years ago
notepad 是自己加的 BOM 头,
BOM 头不是必须的,也不建议。

Python 解释器可以看代码前边类似
# -*- coding: UTF-8 -*-
来识别编码。

Original comment by jhuangjiahua@gmail.com on 4 May 2009 at 2:26

GoogleCodeExporter commented 9 years ago
是的。bom不是必须的,大部分的都不带这个的。

Original comment by limo...@gmail.com on 5 May 2009 at 3:13