Non-ASCII characters are not allowed outside of literals and identifiers

简介:

出现这种问题,一般是在代码里面非注释的地方,出现了非ascii字符。

比较常见的情况是,在代码中出现了中文字符。比如在引用字符串时,用了中文的引号。或者在一行代码结尾处,使用了中文的分号。

这种问题在编译时,xcode会提示出错的行,所以解决起来就是细心观察出错的那一行,看看有什么非ASCII字符。修改完成后,编译就能通过了。


本文转自leipei博客园博客,原文链接:http://www.cnblogs.com/leipei2352/p/3722472.html,如需转载请自行联系原作者

目录
相关文章
|
8月前
|
应用服务中间件
The valid characters are defined in RFC XXXX
The valid characters are defined in RFC XXXX
52 0
|
7月前
|
JavaScript
Invalid project name: “Philosophers-Stone“Warning: name can no longer contain capital letters
Invalid project name: “Philosophers-Stone“Warning: name can no longer contain capital letters
|
JSON JavaScript 应用服务中间件
关于The valid characters are defined in RFC 7230 and RFC 3986问题
建议从目前的角度出发使用第三种方式降低tomcat版本就可以了,如果从长远出发的话,建议遵循RFC 7230 and RFC 3986规范,对于非保留字字符(json格式的请求参数)做转义操作。
1692 0
关于The valid characters are defined in RFC 7230 and RFC 3986问题
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
|
编解码 前端开发 JavaScript
IE上的 The valid characters are defined in RFC 7230 and RFC 3986 坑的解决方法
IE上的 The valid characters are defined in RFC 7230 and RFC 3986 坑的解决方法
321 2
|
JSON 数据格式
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
成功解决ValueError: ‘usecols‘ must either be list-like of all strings, all unicode, all integers or a ca
成功解决ValueError: ‘usecols‘ must either be list-like of all strings, all unicode, all integers or a ca
|
网络安全
Bad escape character ‘ygen‘
Bad escape character ‘ygen‘
Bad escape character ‘ygen‘
|
移动开发 Python Java