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

简介:

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

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

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


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

目录
相关文章
|
6月前
|
应用服务中间件
The valid characters are defined in RFC XXXX
The valid characters are defined in RFC XXXX
38 0
|
4月前
|
编解码 开发者 Python
详解'unicodeescape' codec can't decode bytes in position 16-17: malformed \N character escape
遇到“`unicodeescape` codec can't decode bytes in position X-X: malformed \N character escape”错误时,首先不要慌张。通过逐步检查和修正代码中的Unicode转义序列,大多数情况下都能找到问题的根源并加以解决。有效利用Python的Unicode支持特性,可以优雅地处理各种复杂的字符编码问题。
127 3
|
3月前
|
Java Spring
allowedOrigins cannot contain the special value "*"
allowedOrigins cannot contain the special value "*"
39 0
|
5月前
|
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
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
|
JSON JavaScript 应用服务中间件
关于The valid characters are defined in RFC 7230 and RFC 3986问题
建议从目前的角度出发使用第三种方式降低tomcat版本就可以了,如果从长远出发的话,建议遵循RFC 7230 and RFC 3986规范,对于非保留字字符(json格式的请求参数)做转义操作。
1339 0
关于The valid characters are defined in RFC 7230 and RFC 3986问题
|
编解码 前端开发 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 坑的解决方法
264 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】的解决办法
|
网络安全
Bad escape character ‘ygen‘
Bad escape character ‘ygen‘
Bad escape character ‘ygen‘