banner
Lainbo

Lainbo's Blog

github

In Windows, Sogou Input Method provides an elegant way to output straight quotation marks 「」.

In Chinese typesetting, straight quotation marks 「」 have several advantages over curved quotation marks "":

  1. In Unicode, the curved quotation marks used in Chinese and Western languages share the same code point. The default display width is designed for Western languages and is smaller than the width of a Chinese character. Straight quotation marks can clearly distinguish Chinese quotation content, with better visual recognition than curved quotation marks.
  2. Using 「」 does not imply sarcasm, while using "" requires consideration of whether sarcasm is being used.

However, the latest version of Sogou Input Method does not directly provide a setting option for 「」 in the custom punctuation feature. This guide will explain in detail how to input 「」 by modifying the configuration file.

Effect achieved in this article#

Without relying on any additional software or downgrading to older versions, only using Sogou Input Method itself, Shift+[ ] (or other keys) can output straight quotation marks.

Preparation#

Locating the configuration file#

  1. Search for the file: %USERPROFILE%\AppData\LocalLow\SogouPY.users\00000001\punctures.ini

Note: In some cases, this file may not be found:

  • If the custom punctuation feature has never been used, the file may not exist. Solution: Modify a punctuation setting in Sogou Input Method and then change it back. This operation will generate the required file.
  • The file path may be incorrect. If \SogouPY.users\00000001\ does not exist, it may be because you are not logged into your Sogou account. You can choose to log in to your account or directly search in the %USERPROFILE%\AppData\LocalLow\SogouPY directory.

File processing#

  1. Copy punctures.ini to a path that does not contain Chinese characters, for example: D:\App\SogouInputConfig\punctures.ini

    Is this file name serious? punctures: piercing, punctuate is the meaning of punctuation marks

Configuration modification#

You need to modify the copied file, not the original file in the user directory.

Taking modifying Shift+left and right square brackets as an example, by default, pressing this shortcut in Sogou Input Method in Chinese or English mode will output {}. Here, we will modify the output in Chinese mode to be straight quotation marks.

  1. Open the copied punctures.ini file with a text editor.
  2. Find the sections [hlaahl] and [hnaahn].
  3. Modify the ChHalf values in these two sections:
    • Change ChHalf under [hlaahl] to amdaaaaadm
    • Change ChHalf under [hnaahn] to andaaaaadn
    • Save the file

Extension: More custom options#

  • Set left and right square brackets [ ] as straight quotation marks
    • The code for left and right square brackets is [flaafl] and [fnaafn]
  • Code for straight double quotation marks 『』:
    • Left straight double quotation mark 『: aodaaaaado
    • Right straight double quotation mark 』: apdaaaaadp

Combine them as needed.

To learn the codes for other punctuation marks, you can check in Sogou Input Method:

  1. Open "More Settings"
  2. Go to "Property Settings" -> "Common" -> "Custom Punctuation"
  3. The key options displayed here correspond one-to-one with the codes in punctures.ini

Protecting the configuration#

To prevent Sogou Input Method from automatically reverting the modifications, please follow these steps:

  1. Delete the original file, which is the one you initially searched for, most likely on the C drive.
  2. Set the modified punctures.ini file to read-only:
    • Right-click the file -> Properties -> Check "Read-only" -> OK
  3. Run the command prompt as an administrator (use cmd, not PowerShell), and execute the following command:

Note: Replace with your actual paths. The first part is the address of your original file, and the second part is the address of your modified file. This means creating a symbolic link named punctures.ini in the original file's location, pointing to the copied configuration file.

```
mklink "C:\Users\[username]\AppData\LocalLow\SogouPY.users\00000001\punctures.ini" "D:\App\SogouInputConfig\punctures.ini"
```

Applying the changes#

  1. Restart your computer for the changes to take effect.

Notes#

  • If you want to modify the settings through the Sogou Input Method interface, please remove the read-only attribute of punctures.ini first. After making the modifications, remember to set it back to read-only.
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.