unicode

What puts the terminal in Unicode mode?

What puts the terminal in Unicode mode? I have a Debian server which is not properly displaying Unicode characters when logged in locally, without starting X11. Unicode works after running unicode_start (until the terminal is closed). It also works automatically when logging in via SSH (presumably because it’s up to my terminal emulator and not …

Total answers: 1

How to use unix `mv` to rename files with unicode spaces(not U+20)?

How to use unix `mv` to rename files with unicode spaces(not U+20)? $ ls cn* cn blah blah.txt $ ls cn * ls: cannot access ‘cn *’: No such file or directory $ ls cn*|hexdump -C 00000000 63 6e e2 80 85 62 6c 61 68 c2 a0 62 6c 61 68 2e |cn…blah..blah.| 00000010 74 78 …

Total answers: 1

Why is ls sorting Chinese filenames by length?

Why is ls sorting Chinese filenames by length? I’ve run into a bit of a weird behaviour that I don’t fully understand with ls and Chinese filenames. I’m running macOS 13.6.1 with SIP enabled (no core OS modifications), MacPorts installed, and US English as the primary language. First, run this little script in a blank …

Total answers: 2

groff -mandoc creating "ESC[1m" versus overstriking with backspace for bold text

groff -mandoc creating "ESC[1m" versus overstriking with backspace for bold text I found that groff uses different ways to indicate bold text for the utf8 output format. On FreeBSD 14, groff emits escape codes for a terminal (ESC, [1m): $ printf ".Dd todayn.Sh NAMEn" | groff -mandoc -Tutf8 | od -c 0000000 n 033 [ …

Total answers: 2

Why is MB_CUR_MAX 6 instead of 4 for UTF-8? (Linux, glibc)

Why is MB_CUR_MAX 6 instead of 4 for UTF-8? (Linux, glibc) MB_CUR_MAX is defined by glibc as ‘a positive integer expression that is the maximum number of bytes in a multibyte character in the current locale.’ If I print the value I get 1. I assume that this is because C uses the C locale …

Total answers: 1

does Ubuntu use a different unicode?

does Ubuntu use a different unicode? I use Persian letter ۀ (U+06C0) so many times, so I tried to assign a simple key for it. I opened "/usr/share/X11/xkb/symbols/ir" and changed a key which I never use, like this: key <AC07> { [ Arabic_teh, 0x000006C0, VoidSymbol ] }; but instead of ۀ it types ю which …

Total answers: 1

I need to create a pipe to convert string from UTF-8 to UTF-7-IMAP

I need to create a pipe to convert string from UTF-8 to UTF-7-IMAP To automate the command line creation of hundreds of directories in IMAP maildirs, I would need to be able to convert UTF-8 strings to UTF-7-IMAP on the fly. In php, I found a way to do it with a string passed as …

Total answers: 2

Entering special characters the same way on Windows and Linux

Entering special characters the same way on Windows and Linux ctrlshiftu followed by the hex value of a Unicode character enters that character. For example, ctrlshiftu41 enters ‘A’, whose value is 0x41 in hex and 65 in decimal. There’s also the compose key, which lets you enter digraphs (e.g. compose keye^ produces ‘ê’). Unfortunately, neither …

Total answers: 2

Expand tabs in file with utf8 characters

Expand tabs in file with utf8 characters I use expand to expand tabs to spaces. For utf8 files expand doesn’t work correctly. E.g. in ćta tab is expanded to 6 spaces while in ata to 7 spaces. How do I make it work for utf8 files? Asked By: Marcin Król || Source You could use …

Total answers: 1

Collect chars from strings and print their unicode

Collect chars from strings and print their unicode Context (skip, if you don’t care; read, if you suspect I’m totally on the wrong track) For an embedded system with small memory, I want to generate fonts which contain only those glyphs actually needed. so at build time, I need to scan the language files, extract …

Total answers: 4

Box character doesn't display properly in Linux terminal

Box character doesn't display properly in Linux terminal I was just writing a C++] program that uses the box characters to display information.  I ran the program on macOS and used the terminal app and it worked fine. When I switched to Debian Linux using the same code and recompiling it, I only then encountered this problem!  …

Total answers: 3

Command similar to ascii for ascii extended and/or for unicode?

Command similar to ascii for ascii extended and/or for unicode? ascii command in Linux is fast and great. It allows us to search for a character or for a code point and returns all relevant results for a given search. Is there something similar for ASCII extended (e.g.: ISO-8859-1) and/or for Unicode characters? Asked By: …

Total answers: 1

How do I create a zip that preserves unicode character composition on linux?

How do I create a zip that preserves unicode character composition on linux? I’m on Debian. I have a file called Sóanr.jpg. According to https://emojidissector.com/, this is made of the following code points: S 0053 LATIN CAPITAL LETTER S o 006F LATIN SMALL LETTER O ́ 0301 COMBINING ACUTE ACCENT a 0061 LATIN SMALL LETTER …

Total answers: 1

Writing bash arguments with trunctation

Writing bash arguments with trunctation I want to print the first two arguments of a bash function, with the unicode character u2263 on each side using a two space separation. The thing is that the final unicode must display at column 70. If the character region where $1 and $2 reaches column 68, the excess …

Total answers: 3

Different encoding/Unicode interpretation using terminal vs using shell script

Different encoding/Unicode interpretation using terminal vs using shell script I was working on a keymap script (map keys from one language keyboard layout to another). And after a lot of hard time trying to get everything working I found out that different characters are treated differently in all programs (perl, python). Then I run a …

Total answers: 1

Using UTF-16 syntax to include Unicode characters in Bash prompt (PS1)?

Using UTF-16 syntax to include Unicode characters in Bash prompt (PS1)? There is an existing post on Unix & Linux about including Unicode characters in the Bash prompt, but the method it gives for using the UTF-16 code (syntax uXXXX) doesn’t work for me. Let’s take this arrow as an example: Unicode Character ‘BLACK RIGHTWARDS …

Total answers: 1

Is my text mangled beyond repair?

Is my text mangled beyond repair? My mangled Czech text: NOTE ON CZECH BIRTH NUMBER VALIDATION IN CZECH LANGUAGE; in Czechia birth number = personal identification number ======================================================== Do roku 1985 bylo pé?idá?leno cca 1000 rodnű§ch á?űŮsel, kterűŔ nejsou dá?litelnűŔ 11. NenűŮ vylouá?eno, éƒe se v miniműŔlnűŮm poá?tu vyskytly i po tomto roce. KorektnűŮ algoritmus …

Total answers: 1

interpret UXXXXXXXX Unicode codes in text file

interpret UXXXXXXXX Unicode codes in text file I have the following file : $ cat test Villes visitU000000e9es How can I interpret those UXXXXXXXX codes, e.g. how can I get : $ cat test | pipe into something Villes visitées Asked By: ChennyStar || Source With perl: $ perl -C -pe ‘s/\U([[:xdigit:]]{8})/chr hex$1/ge’ <yourfile Villes …

Total answers: 1

used awk to search by unicode in txt file

used awk to search by unicode in txt file How i can used awk to search in txt file by unicode like : u+064C u+064D and please how i count results and print the number in first line. Asked By: alomndo || Source If using zsh¹, you can do: SEARCH=$’u64c’ awk ‘index($0, ENVIRON["SEARCH"])’ To print …

Total answers: 1