Google图表API QR码在结尾处有线路断路

发布于 2025-02-09 06:54:53 字数 768 浏览 2 评论 0原文

我需要在文本末尾使用线断路(\ r \ n)创建QR代码
我试图像这样的Google图表API实现这一目标
%0D%0a - 是\ r \ n的URL编码值

https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=qr_1a146dbd-c799-41c3-ad3d-ce50a5804e49%0D%0A&choe=UTF-8&chld=H

,但是A可以看到Google Trims最后一行断裂
如果我尝试使用多个线路休息的同一文本,那么QR代码将完全相同,

https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=qr_1a146dbd-c799-41c3-ad3d-ce50a5804e49%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A&choe=UTF-8&chld=H

有一种方法可以阻止Google修剪文本吗?
或者如何在最后添加线路休息?

正确的QR码应该在此

Im need to create qr code with line break (\r\n) at the end of the text
im trying to achive this with google chart api like this
%0D%0A - is the url encoded values for \r\n

https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=qr_1a146dbd-c799-41c3-ad3d-ce50a5804e49%0D%0A&choe=UTF-8&chld=H

but a can see that google trims last line breaks
if i try same text with multiple line breaks then qr code will be exactly te same

https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=qr_1a146dbd-c799-41c3-ad3d-ce50a5804e49%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A&choe=UTF-8&chld=H

is there a way to stop google from triming the text?
or how can i add line break at the end?

correct qr code should be line this
qr code

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不乱于心 2025-02-16 06:54:53

作为一个临时的解决方案,我发现在%0d%0a之后添加%02将允许不删除线路休息

as a somewhat temporary solution I found that adding a %02 after %0d%0a will allow the line breaks to not be removed

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文