垂直条(|)Unicode替换 [英] Vertical bar (|) Unicode replacement
问题描述
我们使用垂直栏 |
(|
)字符作为字段分隔符的模块。因此用户不应在标题中使用此字符。
We are using the vertical bar |
(|
) character as a field separator in one of our modules. so the users should not use this character in a title.
如果他们使用它,我想用类似的字符替换它。
If they do use it, I would like to replace it with a similar character.
是否有Unicode替换它?我发现和看起来类似的唯一字符是垂直条 |
(& ;#166;
)。
Is there a Unicode replacement for it? The only character that I have found and looks similar to it is broken vertical bar ¦
(¦
).
推荐答案
我不明白你真正需要什么。你需要将分隔符序列更改为保证不存在于数据集中的东西吗?
I do not understand what you really need. Do you need to change the separator sequence to something guaranteed not to exist in the dataset?
如果是这样,这就是Unicode的66个非字符代码点是专门设计的。你可以使用它们作为内部的哨兵,因为他们知道他们不会出现在有效的数据。
If so, then that’s what Unicode’s 66 "non-character" code points are specifically designed for. You can use them as internal sentinels knowing that they cannot occur in valid data.
如果你只是寻找一个视觉外观,这是非常不同。我不会建议,因为有很多的混淆。这里只是其中的几个:
If you’re just looking for a visual lookalike, that’s very different. I would not suggest that, because there are lots of confusables. Here are just a few of those:
U+0007C | GC=Sm SC=Common VERTICAL LINE
U+000A6 ¦ GC=So SC=Common BROKEN BAR
U+002C8 ˈ GC=Lm SC=Common MODIFIER LETTER VERTICAL LINE
U+002CC ˌ GC=Lm SC=Common MODIFIER LETTER LOW VERTICAL LINE
U+02016 ‖ GC=Po SC=Common DOUBLE VERTICAL LINE
U+023D0 ⏐ GC=So SC=Common VERTICAL LINE EXTENSION
U+02758 ❘ GC=So SC=Common LIGHT VERTICAL BAR
U+02759 ❙ GC=So SC=Common MEDIUM VERTICAL BAR
U+0275A ❚ GC=So SC=Common HEAVY VERTICAL BAR
U+02AF4 ⫴ GC=Sm SC=Common TRIPLE VERTICAL BAR BINARY RELATION
U+02AF5 ⫵ GC=Sm SC=Common TRIPLE VERTICAL BAR WITH HORIZONTAL STROKE
U+02AFC ⫼ GC=Sm SC=Common LARGE TRIPLE VERTICAL BAR OPERATOR
U+02AFE ⫾ GC=Sm SC=Common WHITE VERTICAL BAR
U+02AFF ⫿ GC=Sm SC=Common N-ARY WHITE VERTICAL BAR
U+0FF5C | GC=Sm SC=Common FULLWIDTH VERTICAL LINE
U+0FFE4 ¦ GC=So SC=Common FULLWIDTH BROKEN BAR
这篇关于垂直条(|)Unicode替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!