现在,UTF-8是否已成为具有非ASCII字符的QR码的首选编码? [英] Is UTF-8 the encoding of choice for QR-codes with non ASCII chars by now?

查看:123
本文介绍了现在,UTF-8是否已成为具有非ASCII字符的QR码的首选编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google使用UTF-8作为其非常流行的编码器的默认设置.从我的看到,他们甚至都没有添加字节顺序标记.

Google uses UTF-8 it as default for their very popular encoder. From what I can see they don't even add the byte order mark.

问题在于,大多数扫描仪似乎仍默认使用JIS8(QR 2000)而不是iso-8859(QR 2005),因此使用iso-8859进行编码在大多数情况下不起作用.

The problem is that most scanners still seem to use JIS8 (QR 2000) instead of iso-8859 (QR 2005) as default, so it mostly does not work to use iso-8859 for encoding.

即使违反规范,看来utf-8还是唯一的选择.

It seems like utf-8 is the only choice even if it is against the specification.

edit:我将使用不带ECI和BOM的utf-8.违反所有规范和精神,但目前效果最好.

edit: I will go with utf-8 without ECI and without BOM. Against all spec and spirit but works best at the moment.

推荐答案

规范说ISO-8859-1是字节模式编码的默认设置.但是实际上,是的,您会在日本看到很多Shift-JIS或UTF-8.

The specification says that ISO-8859-1 is the default for byte-mode encoding. However in practice, yes, you'll see a lot of Shift-JIS in Japan, or UTF-8.

UTF-8是正确的选择.要正确执行此操作,您需要在流中添加一些指示,表明它是UTF-8.规范确实允许这样做.您需要在字节段之前加上 ECI段,该字符表示UTF-8.

UTF-8 is the right choice. To do it properly, you need to put some indication in the stream that it's UTF-8. The spec does allow for this. You need to precede the byte segment with an ECI segment that indicates UTF-8.

如果您向zxing编码器发送提示其编码为UTF-8,则它将为您完成此操作.

The zxing encoder will do that for you if you send it a hint that the encoding is UTF-8.

这篇关于现在,UTF-8是否已成为具有非ASCII字符的QR码的首选编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆