我有混合语言的文本文件,想计算其中一种语言的可打印字符的简单总数。语言位于不同的 unicode 范围内是有帮助的。
我的具体用例涉及希伯来语、多调希腊语和英语——但我想这个问题的解决方案也可以推广到其他上下文。
我只想计算希伯来语字符 - 那是 Unicode [\u0590-\u05ff]
。这是一个简短的示例输入文件(根据我的手动计数,它包含 62 个希伯来字符):
[ Ps117 ]?
h1: ? ???? ?? ???? ?? ???? ?????? ?? ????? ?
r1: Praise the LORD, all nations! Extol him, all peoples!
g1: ?????????. ??????? ??? ??????, ????? ?? ????, ?????????? ?????, ?????? ?? ????,
b1: Alleluia. Praise the Lord all you nations: praise him all you peoples.
h2: ? ?? ??? ????? ???? ???? ???? ????? ???? ?? ?
r2: For great is his steadfast …
Run Code Online (Sandbox Code Playgroud) 注意,由于这是运行“ Ubuntu +1 (alpha) ”的机器上的问题,因此它在 AskUbuntu 上超出范围,所以我希望在这里获得一些帮助。
今天早上我遇到了一些奇怪的屏幕行为。我已经使用 Ubuntu Gnome 17.10 (alpha2) 几个星期了,现在非常愉快,主显示器在右侧,辅助显示器在左侧,带有跨屏壁纸——所有显示器都正确显示,并且鼠标从屏幕最左边缘正确移动。辅助显示器,穿过中间分隔线,到主显示器的最右边缘。
但今天早上这种行为发生了变化:
xrandr
报告:
Screen 0: minimum 320 x 200, current 3600 x 1200, maximum 8192 x 8192
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1680x1050+1920+0 (normal left inverted right x axis y axis) 474mm …
Run Code Online (Sandbox Code Playgroud)