iPad上的CSV文件中是否可以使用双引号? [英] Is it possible to use double quotes in CSV files on iPad?

查看:124
本文介绍了iPad上的CSV文件中是否可以使用双引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iPad移动浏览器上遇到特殊CSV解释器(不知道它叫什么)的问题。

I am having issues with the special CSV interpreter (no idea what its called) on iPad mobile browser.

iPad似乎保留字符作为保留或特殊。当出现此字符时,字符串被视为文字,而不是分隔为CSV。

iPad appears to reserve the character " as reserved or special. When this character appears the string is treated as a literal instead of seperated as a CSV.

INPUT:


1111,64-1111-11,某些工具12,112233

1111,64-1111-11,Some Tool 12", 112233

输入上面的输入,CSV mobile-safari显示屏显示([]代表一列)

Give the input above, the CSV mobile-safari display shows ([] represents a column)


[ 1111] [64-1111-11] [某些工具12,112233]

[1111] [64-1111-11] [Some Tool 12, 112233]

请注意缺失。另请注意 112233 不应该像它应该的那样位于自己的列中。

Note that the " is missing. Also note that 112233 is not in its own column like it should be.

问题2:

如何在Safari中获取CSV显示工具,不将六位数字视为电话号码?

Question 2:
How can I get the CSV display tool in safari to not treat a six digit number as a phone number?


1234567

1234567

显示单击超链接并在我单击时要求添加联系人。我不想要超链接。

Shows up as a hyperlink and asks to "Add Contact" when I click it. I do not want the hyperlink.



更新

iPad忽略了CSV文件中双引号的转义字符(或反斜杠不是转义字符)。我正在查看该文件的十六进制版本,我有


UPDATE
iPad is ignoring the escape character (or backslash is not the escape character) for double quotes in CSV files. I am looking at the hex version of the file and I have

\或 5C 22 (采用UTF-8编码的十六进制) 。

\" or 5C 22 (in hex with UTF-8 encoding).

不幸的是,iPad显示反斜杠并仍然将视为特殊字符,从而破坏了我的数据格式。有人知道如何在iPad CSV上使用吗?

Unfortuntely, the iPad displays the backslash and still treats " as a special character, thereby corrupting my data formatting. Anybody know how I can possibly use " on iPad CSV?

推荐答案

关于引号,您是否尝试在输出中转义它们?

With regards the quotes, have you tried escaping them in the output?

编辑:常规转义不适用于CSV文件,我的道歉大多数规范声明如下:

EDIT: conventional escaping doesn't work for CSV files, my apologies. Most specifications state the following:


包含特殊字符(逗号,换行符或双引号)的字段必须用双精度括起来报价。

Fields that contain a special character (comma, newline, or double quote), must be enclosed in double quotes.

所以,在你的CSV片段上测试一下这样一个格式如下的文件:

So, testing this on your CSV snippet, a file formatted like this:

1111,64-1111-11,"Some Tool 12""", 112233

或者甚至是这样:

1111,64-1111-11,Some Tool 12"""", 112233

...在Mobile Safari OK中打开。在Excel中看起来有多好或坏你需要检查。

… opens in Mobile Safari OK. How good or bad that looks in Excel you'd need to check.

转到第二个问题,防止Mobile Safari将号码显示为电话数字,将其添加到您的页面的元素:

Moving to the second issue, to prevent Mobile Safari from presenting numbers as phone numbers, add this to your page's head element:

<meta name="format-detection" content="telephone=no" />

这篇关于iPad上的CSV文件中是否可以使用双引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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