How to display UTF-8 emoji characters in nano editor? - encoding

How do I display emojis (UTF-8) when I open a file using the nano editor? I can only see blank spaces where they should be appearing. When
I read in ubuntu thread a proposed solution saying you should check the character encoding of your terminal but when I try it I only see the 'UTF-8' and 'Default UTF-8' options. But I don't think this solves anything for I can see emojis being printed on terminal's screen when I concatenate the file.
Funnily enough, when I use multitail to see the same file in real-time, again from terminal, I see garbage instead of emojis.
My environment variables:
LANGUAGE=en_GB:en
LAN (none)
LC_ALL (none)
Is there any solution to this? Thanks!
I'm using Debian Wheezy.

Related

Having font issue with VS Code Terminal

On my Mac OS Mojave, I am using iTerm2 with powerlevel9k theme.
For the fonts to render well, I am using SourceCodePro+Powerline+Awesome+Regular as the font and also added a line POWERLEVEL9K_MODE='awesome-patched' to the .zhrc.
The emojis are not rendering well on vs code terminal. So vscode's settings.json, I set "terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome+Regular',",. That hasn't fixed the issue. So, I set "terminal.external.osxExec": "iTerm.app". That also doesn't help.
What could be the reason? How can I fix it? How is vs code terminal different from iterm2?
Not sure if this related to the font issue. what ever command I give in VSCode Terminal, is repeating.
demo >> demozsh: command not found: demo
echo >> echo
cd Documents >> cd%
What is the issue I am facing?
Unicode 11 support
The width of characters in the terminal now default to the unicode 11 widths. What this means to most people is that emojis will be correctly showing up as wide characters.
from https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_43.md#unicode-11-support possibly fixed in v1.43

Output for codeception in the command-line looks weird. Encoding issue?

There are weird characters when running codeception in the command-line. How can I fix this? I'm using Windows and tested in the terminal window for phpstorm and windows cmd.
I'm not sure how it was resolved but I stopped seeing the weird characters after updating PhpStorm to 2018.3.1.
The characters you see there are ANSI colour codes.
They can be disabled by passing --no-ansi parameter to codecept run, or by disabling colours in codeception.yml file:
settings:
colors: false

PyCharm 55 UTF-8 Encoding

When I'm trying to print Russian text in console I get �����, despite the fact I set File Encoding and IDE Encoding to UTF-8. This problem have appeared only after updating PyCharm to 5.
Here's the pic of Typing Russian text
If in Windows or Linux add the following lines at the end of the file (Windows)PYCHARM_HOME/bin/pycharm.exe.vmoptions, (Linux)PYCHARM_HOME/bin/pycharm.vmoptions:
-Dconsole.encoding=UTF-8
-Dfile.encoding=UTF-8
In OS X Open Info.plist located in /Applications/RubyMine.app/Contents, locate the tag <key>VMOptions</key>, and modify it as follows:
<key>VMOptions</key>
<string>-Xms16m -Xmx512m -XX:MaxPermSize=120m
-Xbootclasspath/p:../lib/boot.jar -ea
-Dconsole.encoding=UTF-8
-Dfile.encoding=UTF-8
</string>
Taken from Configuring Output Encoding and Why unicode string is not shown on PyCharm's console?
Try this: go Settings -> Editor -> File Encodings and set Project Encoding to System Default (It was windows-1251 encoding in my case). It works for me.

Using clipboard/ copy paste results in chinese looking characters (debian sid)

Using Emacs on my linux box (wheezy, awesome,gnome and kde) I run into big trouble using clipboard even from one emacs instance to another.
Everything I put into the clipboard is converted into chinese looking characters in emacs. Only solution is to copy paste into some other editor (e.g. nano, vi) save it and open it in emacs.
I use the same .emacs on my other (ubuntu) computer and on windows 7 with out any trouble. I erased all my previous encoding settings I had without any success.
http://stackoverflow.com/questions/ask
after copy paste gets
栊瑴㩰⼯瑳捡潫敶晲潬⹷潣⽭畱獥楴湯⽳獡k
I run into the same problem today, with a little different environment tho. I've been using Emacs 24.3.1 on Windows 7, then switched to the same version running under Cygwin+XWin with the same .emacs.d config. While clipboard under Windows worked fine, with the config I had under Cygwin/XWin I had the same problem as in the question.
Under terminal it worked fine, with XWin the -Q worked too, so after a little digging, it turned out to be:
;; MS Windows clipboard is UTF-16LE
(set-clipboard-coding-system 'utf-16le-dos)
I don't remember why I added this. I must have copied it from some Emacs Wiki in early days. When I googled it now, it seems like a popular setting in people configs. It turns out, under Windows I don't need this line for clipboard to work properly with Emacs (quick check with some polish diacritical characters), and under Cygwin/XWin it finally started to work.
(sorry, I haven't the reputation to comment, so I leave a clarification request here)
Are you using emacs in a terminal ? if so, which one (konsole, lxterm, xterm...) ?
Are you cut'n'pasting with mouse (middle click) or keyboard ?
Have you any clipboard manager running (eg glipper) ?
Do you get the same behavior if you start without an init file (~/.emacs), that is, using emacs -Q?
If you can come up with a reproducible recipe starting from emacs -Q then, unless you get some solution proposed here, consider filing an Emacs bug report: M-x report-emacs-bug.

Encoding problems across Eclipse, Mercurial, Windows and Mac OS

During my CS studies, we have a good bit of group assignments. We program in Java using Eclipse. We (or atleast i try to get them to) share code using Mercurial and BitBucket. I'm running Mac OSX 10.7 and the others are running Windows 7. We often have problems with the encoding when we share code. Danish characters such as æ, ø and å is often a mess.
What settings should we run across our eclipse setups to ensure that the encoding will be the same (and what encoding would be preferred?) On Windows, Eclipse defaults to Cp1252 and on MacOS it defaults to MacRoman. I've been trying to get everyone to use UTF-8, but code they previously wrote (in Cp1252) wont show correctly, so they are forced to switch around a lot, which usually ends up in them defaulting back to Cp1252 and forgetting about it when they submit code to a shared repository.
For me it works to use the standard encoding (Cp1252) in Eclipse on Windows and to tell Eclipse on Mac to use the encoding ISO-8859-1. On Mac I configured this for my whole workspace in the settings (under General --> Workspace).
Encode old 1250 texts into UTF8 by hand and use only these versions
Speaking from experience, I believe the best solution is for everybody to use UTF-8, that can represent any Unicode character.
The workaround CP1252 & ISO-8859-1 is not perfect, some characters are not compatible between them. Moreover, most IDEs default to UTF-8, if someone must have the trouble of changing Eclipse encoding settings, I believe it should be Windows users.
So after much headache using CP1252 & ISO-8859-1, I decided to change all my files to UTF-8. In case someone is interested, you can do that on Unix with a command like this, that will change all files in the current directory and its subdirectories:
find . -name "*.java" -exec sh -c "iconv -f ISO-8859-1 -t UTF-8 {} > {}.utf8" \; -exec mv "{}".utf8 "{}" \;
Since you are informing the original encoding, iconv will be able to convert without messing with accents and special characters.
Then ask everybody to create a new workspace, configure all encoding configuration on Eclipse to UTF-8 (Windows users) and import the project again.