Cygwin terminal does not display some characters such as Arabic (with the encoding Windows-1256 and ISO-8859-6). It shows only punctuation and numbers!
I've ran into this.
Firstly ensure that the language is installed in your operating system.
Then right click on the terminal > options > text, set the encoding, locale and a font that you know works for your language.
This should ensure that the correct characters output in the cygwin terminal.
Related
I want a vim-like text editor to send code to REPLs including iPython in Windows. In Linux SLIMUX is perfect. (I use WSL often, but sometimes it's inconvenient.)
Let's start with ATOM's platformio-ide-terminal package. Here's the code I send:
and here's what get's sent to the iPython REPL running in Powershell:
For ordinary Python it does not do that; it works fine.
Let's go to NeoVim's iron.nvim, where things are even worse for iPython when sending a selection (<Plug>(iron-send-motion)):
In addition to adding extra characters, the iron.nvim send-selection command fails to even execute the command (an issue logged on Github). The just sits in the REPL until you switch vim windows, go into insert mode, and press enter. While it will not add extra characters to ordinary Python, it will still not execute it (this could be a separate issue).
What's going on with iPython and these extra characters? Is there any way to fix it? Why, on Windows, is it so difficult to send code from a text editor to an arbitrary REPL?
This post on the emacs stack exchange at least has a partial answer: At Version 5, iPython got a "new terminal interface" that was incompatible with Emacs' inferior shells. It makes sense that it would give Atom's and iron.nvim's a hard time as well.
For Atom, starting the shell with ipython --simple-prompt completely solves the problem. For iron.nvim, it at least gets rid of the bad characters. In iron.nvim, I've traded bad characters for the iPython multiline paste loosing its newlines, but that seems out of scope for this question.
I would like to find out which version of Electron an Electron desktop app like Signal Desktop or Visual Studio Code is using. Is there a simple way - like entering a command in the Development Console?
Thanks! Johannes
(Why? I would like to see if it is affected by bugs like https://www.trustwave.com/Resources/SpiderLabs-Blog/CVE-2018-1000136---Electron-nodeIntegration-Bypass/)
You can, if the App enabled developer tools and enabled nodeIntegration. take VS Code as an example:
open the Developer Tools, in the console tab, type
process.versions.electron
documentation here: https://electronjs.org/docs/api/process
or try parsing version from userAgent string
navigator.userAgent.match(/Electron\/([\d\.]+\d+)/)[1]
Open the Developer tools and in the Console tab type:
navigator.userAgent
For example in the Discord app I'm getting:
Mozilla/5.0 ... Electron/9.3.5 ...
Under a Unix-like or Linux system (and possibly under Windows using Cygwin or MSYS shells or WSL, but this is untested there), you can use the strings program even for progams that are built without the developer tools enabled.
Basically, you're just searching for a user-agent string in the binary itself.
Currently, I have been able to do the following:
$ strings example-electron-app-binary-file | grep '^Chrome/[0-9.]* Electron/[0-9]'
Chrome/98.0.4758.141 Electron/17.4.7
That regular expression searches for strings starting with Chrome/, followed by any number of numerical digit and dot characters, a single space, and then Electron/ with any numerical digit after it.
This won't work in all likelihood if your system uses UTF-16 strings, but since browsers tend to use UTF-8 internally there's still a chance it'd work on a Windows electron binary.
I'm using MikTeX 2.8 edition, and installed the hungarian language support and hyphenation files. Using the standard LaTeX command they work fine, but when I try to use pdfLaTeX, they don't get loaded and I get the
(C:\stuff\miktex\tex\generic\babel\magyar.ldf
(C:\stuff\miktex\tex\generic\babel\babel.def)
Package babel /b/c12/cWarning:/b/c0/c No hyphenation patterns were loaded for
(babel) the language `Magyar'
(babel) I will use the patterns loaded for \language=0 instead.
message. Using latex it works fine:
(C:\stuff\miktex\tex\latex\00miktex\bblopts.cfg)
(C:\stuff\miktex\tex\generic\babel\magyar.ldf
(C:\stuff\miktex\tex\generic\babel\babel.def)))
I tried updating the FNDB and the Formats, but to no avail.
I had the same problem in Windows 7. I installed MikTeX and configured the hyphenation languages under administrator account and when I started to use pdflatex under my own account, it turned out that it did not detect the languages that I had added in the MikTex Settings (Admin) application.
The solution was to run MikTex Settings under my own account (i.e. the non-Admin program in Start Menu) and click the button "Update Formats".
I have the same problem with MiKTeX 2.8, babel, pdflatex and language "portuguese".
Regular latex works fine.
Went back to MiKTeX 2.7 and the problem doesn't happen.
Removing MikTeX 2.8 and cleaning the registry by hand, then reinstalling it solved the problem. (simply removing and reinstalling didn't solve it)
First find out language.dat file under your installation. Then find there a string like %magyar bla-bla-bla, remove comment (% mark), or, if there is no such line in that file - add it. Bla-bla-bla stands for the exact name of file with hyphenation table, you should google of how does that called.
Then run "update formats" from the miktex options menu, BUT - do that for the Options, and NOT for Options (Admin) menu.
Good luck!
I would like to use spaces instead of tabs when editing Perl scripts with the native vi found on Solaris systems.
I know this can be done with the vim clone, but I don't have access to install vim on these systems as they are vendor locked.
Firstly, is there a way to configure vi to emit spaces when I press TAB?
And secondly, I am also using the auto-indent feature of vi:
:set ai
The problem is, when I manually enter spaces for indenting vi converts groups of 8 spaces into tabs automatically when it does auto-indenting. I guess if I can find a way to turn this functionality off it will be a start.
For an outside-the-box option, could you export the Solaris filesystem using NFS and edit the files you need on another system with a more capable editor?
I believe you want
:set et
(short for expandtabs). I think vi classic supports it.
I realize this is well beyond the best-by date, but I just ran into this issue and was looking for an answer myself. A real pain when editing yaml on a FreeNAS box.
Anyhow, I successfully dealt with the issue by setting the value of tabstop to a large value.
':set tabstop=1000'
Does anyone use Atom with foreign characters (e.g. Japanese). I found one post on this, but no one had replied.
Is there a package to install or something? I have Japanese Anthy installed, so I can type Japanese characters in other programs (LibreOffice, Chrome, etc), and I'm saving in UTF-8. Just in Atom these characters appear as squares.
This was a known bug with Atom (Issue #7899), and has been fixed in newer versions, please check your atom version and upgrade if necessary.