I'm using emacs(version below) on Windows7(x64). I have trouble writing a é in emacs.
I would like to hit '´' and 'e' to get the char 'è'.
I have used emacs for >20years and I do not remember it has been a trouble before. It has worked before, I'm almost sure of... There is no problem displaying the 'é', and I can cut-and-paste from other programs/buffers. The problem is to type it.
Any solution would be much appreciated.
BR/Tomas
(GNU Emacs 23.4.1 (i386-mingw-nt6.1.7601) of 2012-02-04 on MARVIN)
Try C-x8'e.
Typing C-x8C-h will display an input table for all Latin-1 characters.
Add this to your .emacs file if you want to type "'" "e" to get "é"
(defadvice switch-to-buffer (after activate-input-method activate)
(activate-input-method "latin-9-prefix"))
If you want to just activate it for one session, do
M-x set-input-method
and enter
latin-9-prefix
If you're using a keyboard setting with dead keys, which makes ' + e = é, like the us-international keyboard map (if I remember correctly?) you might want to put (require 'iso-transl) somewhere in your emacs init file.
I don't use Windows, but I don't see any warning about it in the iso-transl elisp file.
Here is a list of the most common special characters to use and also type fluently.
ä - M-d
Ä - M-D
ë - M-k
Ë - M-K
ï - M-o
Ï - M-O
ö - M-v
Ö - M-V
ü - M-| (argh, I've to use shift for the non-capitals and vice versa)
Ü - M-\ (dito.)
ß - M-_ (dito.)
é - M-i
É - M-I
è - M-h
È - M-H
à = M-`
À = M-#
Courtesy - LINK
Related
Under Windows 10 Enterprise LTSC, I have a simple CMD ff.bat which contains:
powershell -Command (Measure-Command {ffmpeg.exe -hide_banner -i %* E:\%~n1.mkv}).ToString
In CMD> ff test.mp4 and ff "test.mp4" works but NOT
ff "E:\Serie.(2009).8x04.episode.FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mkv"
Given PowerShell error is:
Au caractère Ligne:1 : 60
+ (Measure-Command {ffmpeg.exe -hide_banner -i Serie.(2009).8x04.episode.FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mkv ...
+
~
Nom de propriété manquant après l’opérateur de référence.
(Missing property after reference operator)
Au caractère Ligne:1 : 144
+ ... .FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mp4 E:\Serie ...
+ ~
Nom de propriété manquant après l’opérateur de référence.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingPropertyName
I guess the problem comes from the .-[]():\ and brackets and parenthesis characters found in the file name.
Could you give me the proper syntax for this to work in CMD, please.
As a bonus, you can give me the syntax to make it work in PS if it can.
Please note I'm a complete newbie in PowerShell and need examples more than suggestions.
Thanks in advance, Marc.
Your assumption here...
I guess the problem comes from the .-:\ and brackets and parenthesis
characters found in the file name
...is correct.
There are special characters in every language use case. They can only be used as defined in the language specification. If any string you are using has these types of characters, you either need to remove them or properly terminate them.
<#
LONG DESCRIPTION
Windows PowerShell supports a set of special character sequences that
are used to represent characters that are not part of the standard
character set.
The special characters in Windows PowerShell begin with the backtick
character, also known as the grave accent (ASCII 96).
The following special characters are recognized by Windows PowerShell:
`0 Null
`a Alert
`b Backspace
`f Form feed
`n New line
`r Carriage return
`t Horizontal tab
`v Vertical tab
--% Stop parsing
#>
Get-help -Name about_Special_Characters
Even parenthesis, braces, brackets, also have special meaning, and cannot be used in file names.
PowerShell - Special Characters And Tokens
So, by what you show in that failing file name, you need to rename those.
I have a Portuguese keyboard
All keys are ok, but ç or Ç returns a beep sound instead of displaying it.
If I open vi then start typing, then ç or Ç show ok.
Any ideas?
If you are on AIX/PASE, the UTF-8 locales are all in the format LL_CC or LL_CC.UTF-8 and not ll_CC.UTF-8 like they are on Linux/BSD/etc. You want either PT_PT or PT_PT.UTF-8 for UTF-8 in Portugal.
You can see the list of locales and encodings here: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.nlsgdrf/support_languages_locales.htm
You have to fix your bash environnment for it to accept UTF-8 characters.
If you have a .profile or .bash_profile,
add to it the exact 2 following lines:
LANG=pt_PT.UTF-8
export LANG
Then open a new terminal window and check your two keys ç and Ç working correctly.
I'm trying to do a batch script using Windows command line to convert some characters for example:
É to Й
Ö to Ц
Ó to У
Ê to К
Å to Е
Í to Н
à to Г
Ø to Ш
Ù to Щ
Ç to З
with no success. That's because I am using a program that does not support a Cyrillic font.
And I have already the file with these words, like:
ОБОГРЕВ ЗОНЫ 1
ДАВЛЕНИЕ ЦВЕТА 1
...
and so on...
Is it possible?
I'm guessing that you'd like to convert the character set (alias code page) of a file so you can open and read it.
I'm assuming you are using a Windows computer.
Let's say that your file is russian.txt and when you open it with notepad, the characters doesn't make any sense. The russian.txt file's character encoding is most propably ANSI and it's code page is Windows-1251.
Some words about character encoding:
In ANSI one character is one byte long.
Different languages have different code pages: Windows-1251 = Russian, Windows-1252 = Western Languages (English, German, Swedish...), Windows-1253 = Greek ...
In UTF-8 English characters are one byte long and non-English characters two bytes long.
In Unicode all characters are two bytes long.
UTF-8 and Unicode doesn't need code pages.
You can check the encoding by opening the file in notepad and clicking File, Save As. At the right bottom corner beside the Save-button you can see the encoding.
With some googling I found a site where you can do the character encoding conversion online. I Haven't tested it, but here's the address:
http://i-tools.org/charset
I've made a script (= a small program) which changes the character encoding from any ANSI and code page combination to UTF-8 or Unicode or vice versa.
Let's say you have and English Windows computer and want to convert the russian.txt (ANSI / Windows-1251) to UTF-8.
Here's how:
Open this web-page and copy the script in it to the clipboard:
VB6/VBScript change file encoding to ansi
Create a new file named ConvertCharset.vbs to the same folder, where the russian.txt is, say C:\Temp.
Open the ConvertCharset.vbs in notepad (right click+edit) and paste.
Open CMD (Windows-button+R, cmd, Enter).
In CMD-window type (hit Enter-key at each end of the line):
cd C:\Temp\
cscript ConvertCharset.vbs /InputCharset:Windows-1251 /OutputCharset:utf-8 /InputFile:russian.txt /OutputFile:russian_utf-8.txt
Now the you can open the russian_utf-8.txt in notepad and you'll see the Russian characters OK.
More info:
http://en.wikipedia.org/wiki/Character_encoding
http://en.wikipedia.org/wiki/Windows-1251
http://en.wikipedia.org/wiki/UTF-8
VB6/VBScript change file encoding to ansi
I don't know why, but this topic seems to be badly documented and is covered with controversies as nobody knows the real answer (except for maybe Mr. Moolenaar, who rarely answers anyway).
So basically I've raised a discussion here, and it went dead pretty quickly, probably because there are not too many people using Vim in terminal mode on Windows.
My encoding settings look as follows:
if has('multi_byte')
if empty(&termencoding)
let &termencoding = &encoding
endif
let &encoding = 'utf-8'
let &fileencoding = 'utf-8'
endif
Of course, I have no problems running under GVim: can type any characters, and my patched Consolas for Powerline works just fine. The problems start when I try to run Vim in terminal mode. I use ConEmu, a feature-rich terminal emulator for Windows. It claims to officially support Unicode out of the box. For example, I can run the following test script:
chcp 65001 & (cmd /c type "%~dpn0.cmd") & pause & goto :EOF
English: texts, web pages and documents
Graves,etc: à á â ã ä å æ ç è é ê ë ì í î ï
Greek: ΐ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο
Arabic: ڠ ڡ ڢ ڣ ڤ ڥ ڦ ڧ ڨ ک ڪ ګ ڬ ڭ ڮ گ
Full width: @ A B C D E F G H I J K L M N O
Romanian: texte, pagini Web şi a documentelor
Vietnamese: văn bản, các trang web và các tài liệu
Russian: тексты, веб-страницы и документы
Japanese: テキスト、Webページや文書
Yiddish: טעקסץ, וועב זייַטלעך און דאָקומענטן
Hindi: पाठ, वेब पृष्ठों और दस्तावेज
Thai: ข้อความ หน้า เว็บ และ เอกสาร
Korean: 텍스트, 웹 페이지 및 문서
Chinese: 文本,網頁和文件
and I can see all the symbols correctly in ConEmu. Yes, the test script turns on the 65001 codepage. I've already discovered that Vim cannot work with the 65001 codepage at all, so this seems not to be an option anyway. The default codepage in the terminal is 437, and I can also type something like Russian in ConEmu with this default codepage, and it is displayed correctly.
Reading through :h termencoding, I see that Windows uses Unicode by default to pass symbols. Then, I don't understand why when I type anything non-ANSI in terminal Vim, I see ? symbols? Airline does not display fancy symbols from patched Consolas as well. How to configure true Unicode for terminal Vim on Windows? By the way, &termencoding reports 437 as well.
Could somebody, once and for all, please, explain to me is Unicode support for terminal Vim on Windows there (and how to configure it) or not?
I've wondered about this myself too and in the past tried ConEmu and gave up after struggling to get console vim with 256 colors and fancy fonts working on it.
So today I tried out for sometime again and surprise, surprise - things seem to be working. Given all the extreme sensitiveness to versions, I'm going to try and list down versions of everything
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 1 2014 09:38:34)
MS-Windows 32-bit console version
Included patches: 1-389
Compiled by raghuramanr#ADITI
ConEmu
140723 Alpha
Windows: Win 7x64
ConEmu settings in .vimrc:
" ConEmu
if !empty($CONEMUBUILD)
echom "Running in conemu"
set termencoding=utf8
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
" termcap codes for cursor shape changes on entry and exit to
" /from insert mode
" doesn't work
"let &t_ti="\e[1 q"
"let &t_SI="\e[5 q"
"let &t_EI="\e[1 q"
"let &t_te="\e[0 q"
endif
Steps:
chcp 65001
vim.exe
I still can't get a blinking cursor in vim which is confusing. Still better than before when stuff would be messed up.
There was recently a patch for "Windows 8 IME in console Vim". It was cleaned up by mattn and posted here:
https://gist.github.com/mattn/8312677
It was included with 7.4.142. Does that version fix your issue?
I'm having a problem trying to read in windows a CSV file generated in MAC.
My question is how can I convert the encoding to UTF-8 or even ISO-8859-1.
I've already tried iconv with no success.
Inside "vim" I can understand that in this file linebreaks are marked with ^M and the accent ã is marked with <8b>, Ç = <82> and so on.
Any ideas?
To convert from encoding a to encoding b, you need to know what encoding a is.
Given that
ã is marked with <8b>, Ç = <82>
encoding a is very likely Mac OS Roman.
So call iconv with macintosh* as from argument, and utf-8 as to argument.
*try macroman, x-mac-roman etc if macintosh is not found