How to write Russian/Unicode characters in nano/vi editor - unicode

How do I get Russian letters to show up properly when using nano?
Currently they show up like this:
�^��^�новн�^�е

Related

KFGQPC Uthmanic Script Hafs - Diacritical marks are not displayed properly

I'm using the KFGQPC Uthmanic Script HAFS - Font because it is the best looking font out there for my app. The only problem is, some characters are not displayed properly.
For example have a look at this:
The text, that should be displayed, looks like this:
أُو۟لَـٰٓئِكَ عَلَىٰ هُدًى مِّن رَّبِّهِمْ ۖ وَأُو۟لَـٰٓئِكَ هُمُ ٱلْمُفْلِحُونَ
Notice that circle (sukun) above the first و۟
If you ask which text I use to display the arabic text, its the following (in unicode):
\u0623\u064f\u0648\u06df\u0644\u064e\u0670\u0653\u0626\u0650\u0643\u064e \u0639\u064e\u0644\u064e\u0649\u0670 \u0647\u064f\u062f\u064b\u06ed\u0649 \u0645\u0651\u0650\u0646 \u0631\u0651\u064e\u0628\u0651\u0650\u0647\u0650\u0645\u0652 \u06d6 \u0648\u064e\u0623\u064f\u0648\u06df\u0644\u064e\u0670\u0653\u0626\u0650\u0643\u064e \u0647\u064f\u0645\u064f \u0671\u0644\u0652\u0645\u064f\u0641\u0652\u0644\u0650\u062d\u064f\u0648\u0646\u064e
Any suggestions?
Replace all Unicode characters of \u{06DF} ◌۟ with \u{0652} ◌ْ and that symbol will be replaced by Sukoon. In the text you are using instead of Sukoon upper Zero is used. That is why you see such problem.
Salam ,
I really had the same problem , but i used KFGQPC Uthmanic Taha Naskh on Excel , when i changed to KFGQPC Uthmanic Script HAFS , the display is correct .
I did arabic as the first language of display !

View text or log files using color escape sequences as colored in vscode

I am writing some logs and graphs to .log and .txt files in NodeJS. I use chalk to color my logs and help things stand out. I am also using asciichart to generate some lo-fi but very helpful graphs.
As far as I understand both of these libraries use escape sequences to color text, i.e. \x1b[32m for green, \x1b[31m for red, etc. These escape sequences, when interpereted by a terminal console, get printed as actual color. This is nicely explained in this answer to the question "How to change node.js's console font color?"
I would like to be able to see similarly colored text within an actual text file. Obviously a text file cannot show colors, but I am wondering if a way exists to view a text file such that the escape characters are processed/parsed, and colors are shown, in the same way that happens within a terminal console.
For example, writing a colored asciichart graph to a file looks like this in vscode:
Obviously as a text file \x1b[34m╭\x1b[0m\x1b[34m─\x1b[0m would just show up as such.
Does anyknow know of any vscode extensions, vscode custom language settings, or any other text viewers for that matter, that would be able to view a .txt or .log file, such that the escape characters are used to color the text, rather than be shown as a big text mess above? (Could this feasibly be written as a vscode extension / custom language setting?). While the question https://unix.stackexchange.com/questions/262185/display-file-with-ansi-colors has some nice hints, it ultimately only shows how to view the file in the terminal, not in a more ui-friendly file-viewer.
Well I asked this a bit prematurely. It turns out ANSI Colors vscode extension does exactly this. I'll leave this here for anyone that may have the same needs in the future.

Is there a way to use cursorWordPart*Select command w/o capturing underscore?

I'm a fan of sub-word captures, but I'm used to the sublime way where if you have a word with underscores, it will exclude the underscore from the capture like this:
In VScode, I setup my keyboard shortcuts to use the cursorWordPartLeftSelect and cursorWordPartRightSelect, but they include the underscore like this:
Here are the lines from my config:
Is there a way to change that?
Add the underscore character to the Editor: Word Separators list in the settings (just search for separators).
~!##$%^&*()-=+[{]}\|;:'",.<>/?_ // with the underscore added at the end
I am a little surprised it isn't already there but it isn't. Then your WordPart selectors won't include the underscores.
It looks like v1.44 adds a fix to this so that the cursorwordpartleft/right acts like Sublime Text with respect to underscores. See https://github.com/microsoft/vscode/issues/93239.
I'm experimenting with this extension, and removing underscores and hyphens from VS Code's word separators:
https://github.com/mlewand/vscode-select-part-of-word
Haven't had the time to dig into it and configure it to match Sublime Text yet but I'm praying this will be a part of the puzzle in getting VS Code to work like Sublime Text did!

Entering accented characters with notepad++ using only the keyboard

I am new to notepad++ and like it very much, since I can customize how my text documents look more easily than with wordpad. However, I would like to know if it’s possible to enter accented characters like in wordpad (I thought it was a windows thing, but perhaps it isn’t). In wordpad, I can type, for instance, ctrl-’ then i to get an accented í character. Similarly, I can type ctrl-shift-~ then n to get the accented ñ character. It makes it much easier to enter accented characters than copying and pasting from the character map application, or trying to remember code points. When I tried this method in notepad++ I just got the plain character without the accents. I should also mention that when I open documents with such accented characters already present they appear just as expected. Is there a way to enter accented characters like this in notepad++ using only the keyboard? I am using the latest notepad++ under Windows 7.
In Notepad++ you can go to “Edit” then select “Character Panel” near the bottom of the drop down menu. It will show you the ASCII set available which includes most accented characters. You find the character you want and there will be a number for it, to easily use that, press and hold your ALT key, then, on your keypad on the right side of your keyboard type zero followed by the number for that character. So for something like “ñ” for example, the code for it is 241, so you would press ALT and then type 0241 on the keypad while holding down ALT and you will get the character you need. That works in most Windows programs, even in here.
This only works for ASCII characters in the range of 0 to 255. I don't know of a method other than copying and pasting from the “Character Map” app available in Windows for Unicode. Though I did test Wordpad with the Decimal number of the Hex value you see for a Unicode character above 255 and it will work with the ALT+#### in there, and probably other places, but it doesn't work in Notepad or Notepad++ for some strange reason, sadly. Two I use a lot and have memorized are ALT+0147 and ALT+0148 for the quotation marks “like these”, so once you use the numbers enough you tend to get used to them, or you can jot down the ones you use the most.
For anyone searching for a solution and coming across this page, try this (Windows): install and use the US International keyboard instead of the plain US keyboard. Search for "windows keyboard us international install" or something similar. I liked the techlanguage.com write-up on it and the teckangaroo.com step by step on how to install. Hope this helps someone in future looking around as I was earlier today for how to easily meet this need.
You can make your own keyboard layout to enter arbitrary characters anywhere in Windows, using MSKLC. Here's one I made earlier.
I think it is configured in the input method. With input method containing the characters you mentioned, you can press key combinations to get special letters.
You can add a keyboard layout preset in Windows. Under "Language and Regions" - "Language" - "Language settings" - "Input method" settings in Control Panel, you can add all what you want. Like this:
Switch keyboard layout with Alt + Shift.

How to display non-ascii in emacs?

I am looking at text files of Portuguese words in firefox, and I see accented characters correctly, but when I download the text files and open them in emacs, I see n\372mero (which is número), rela\347\343o (which is relação), and so on. What needs to be done to display the words correctly in emacs?
Try M-x revert-buffer-with-coding-system. It looks like the file is in latin-1.