-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【功能请求】选定的文本半角和全角互换 #54
Comments
你好,有时间请qq:(312815311)详细交流一下,我需要逐个字符进行确定,如此字符需要如何转换。谢谢 |
你好,感谢大佬的回复,提供以下代码用于参考,主要基于UTF8,转换的字符包括A-Z,标点符号、数字、等。另外之前完成转换任务都是基于 vscode插件实现mo-san/Zenkaku-Hankaku.,提供源码插件转换核心代码 full_shape:
" ": { commit: " " }
",": { commit: , }
".": { commit: 。 }
"<": [《, 〈, «, ‹]
">": [》, 〉, », ›]
"/": [/, ÷]
"?": { commit: ? }
";": { commit: ; }
":": { commit: : }
"'": { pair: ["‘", "’"] }
'"': { pair: ["“", "”"] }
'\': [、, \]
"|": [·, |, "§", "¦"]
"`": `
"~": ~
"!": { commit: ! }
"@": "@"
"#": [#, ⌘]
"%": [%, "°", "℃"]
"$": [¥, "$", "€", "£", "¥", "¢", "¤"]
"^": { commit: …… }
"&": &
"*": [*, ·, ・, ×, ※, ❂]
"(": (
")": )
"-": -
"_": ——
"+": +
"=": =
"[": [「, 【, 〔, []
"]": [」, 】, 〕, ]]
"{": [『, 〖, {]
"}": [』, 〗, }]
half_shape:
",": { commit: , }
".": { commit: 。 }
"<": [《, 〈, «, ‹]
">": [》, 〉, », ›]
"/": "/"
"?": { commit: ? }
";": { commit: ; }
":": { commit: : }
"'": { pair: ["‘", "’"] }
'"': { pair: ["“", "”"] }
'\': "、"
"|": [·, "|", |, "§", "¦"]
"`": "`"
"~": "~"
"!": { commit: ! }
"@": "@"
"#": "#"
"%": ["%", %, "°", "℃"]
"$": [¥, "$", "€", "£", "¥", "¢", "¤"]
"^": { commit: …… }
"&": "&"
"*": ["*", *, ·, ・, ×, ※, ❂]
"(": (
")": )
"-": "-"
"_": "——"
"+": "+"
"=": "="
"[": "「"
"]": "」"
"{": "『"
"}": "』"
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
蚕子大佬好:
经常在PDF中复制文字,发现会出现全角和半角混淆的情况。例如 PDF内复制文字:
全角: 1)输入初始 电 压:u= [u1,u2,u3,...,un],其 中n 表示驱动器个数; 2) 生 成 扰 动 电 压:δu= [δu1,δu2,δu3,..., δun]; 3)发 送 正 向 扰 动 电 压,u+ =u+δu= [u1 + δu1,u2+δu2,u3 +δu3,...,un +δun],计 算 正 向 扰 动指标J+ ; 4)发 送 负 向 扰 动 电 压,u- =u-δu= [u1 δu1,u2-δu2,u3 -δu3,...,un -δun],计 算 负 向 扰 动指标J- ; 5)对 电 压 进 行 迭 代 运 算 ,运 算 公 式 为 u(t+1)=u(t)+ηδu(J+-J- ),
半角:1)输入初始 电 压:u= [u1,u2,u3,...,un],其 中n 表示驱动器个数; 2) 生 成 扰 动 电 压:δu= [δu1,δu2,δu3,..., δun]; 3)发 送 正 向 扰 动 电 压,u+ =u+δu= [u1 + δu1,u2+δu2,u3 +δu3,...,un +δun],计 算 正 向 扰 动指标J+ ; 4)发 送 负 向 扰 动 电 压,u- =u-δu= [u1 δu1,u2-δu2,u3 -δu3,...,un -δun],计 算 负 向 扰 动指标J- ; 5)对 电 压 进 行 迭 代 运 算 ,运 算 公 式 为 u(t+1)=u(t)+ηδu(J+-J- ),
以上为全半角内容对比,希望可以增加功能,半角和全角转换。
提供VScode参考插件,可以实现上述功能:https://github.com/mo-san/Zenkaku-Hankaku.
恳请大佬考虑一下!
The text was updated successfully, but these errors were encountered: